Merge pull request #79 from vernu/android-ui-ux
improve android app ui/uxpull/81/head
-
4android/app/build.gradle
-
3android/app/src/main/AndroidManifest.xml
-
BINandroid/app/src/main/ic_launcher-playstore.png
-
3android/app/src/main/java/com/vernu/sms/AppConstants.java
-
77android/app/src/main/java/com/vernu/sms/TextBeeUtils.java
-
226android/app/src/main/java/com/vernu/sms/activities/MainActivity.java
-
111android/app/src/main/java/com/vernu/sms/helpers/VersionTracker.java
-
57android/app/src/main/java/com/vernu/sms/services/StickyNotificationService.java
-
6android/app/src/main/res/color/radio_button_text_color.xml
-
6android/app/src/main/res/color/radio_button_tint.xml
-
10android/app/src/main/res/drawable/ic_baseline_edit_24.xml
-
10android/app/src/main/res/drawable/ic_baseline_info_24.xml
-
730android/app/src/main/res/layout/activity_main.xml
-
BINandroid/app/src/main/res/mipmap-hdpi/ic_launcher.png
-
BINandroid/app/src/main/res/mipmap-hdpi/ic_launcher.webp
-
BINandroid/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
-
BINandroid/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
-
BINandroid/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
-
BINandroid/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
-
BINandroid/app/src/main/res/mipmap-mdpi/ic_launcher.png
-
BINandroid/app/src/main/res/mipmap-mdpi/ic_launcher.webp
-
BINandroid/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
-
BINandroid/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
-
BINandroid/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
-
BINandroid/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
-
BINandroid/app/src/main/res/mipmap-xhdpi/ic_launcher.png
-
BINandroid/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
-
BINandroid/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
-
BINandroid/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
-
BINandroid/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
-
BINandroid/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
-
BINandroid/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
-
BINandroid/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
-
BINandroid/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
-
BINandroid/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
-
BINandroid/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
-
BINandroid/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
-
BINandroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
-
BINandroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
-
BINandroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
-
BINandroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
-
BINandroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
-
BINandroid/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
-
17android/app/src/main/res/values-night/colors.xml
-
33android/app/src/main/res/values-night/themes.xml
-
7android/app/src/main/res/values/colors.xml
-
2android/app/src/main/res/values/strings.xml
-
10android/app/src/main/res/values/styles.xml
-
18android/app/src/main/res/values/themes.xml
-
1android/build.gradle
|
Before Width: 512 | Height: 512 | Size: 237 KiB After Width: 512 | Height: 512 | Size: 131 KiB |
@ -0,0 +1,111 @@ |
|||
package com.vernu.sms.helpers; |
|||
|
|||
import android.content.Context; |
|||
import android.util.Log; |
|||
|
|||
import com.vernu.sms.ApiManager; |
|||
import com.vernu.sms.AppConstants; |
|||
import com.vernu.sms.BuildConfig; |
|||
import com.vernu.sms.dtos.RegisterDeviceInputDTO; |
|||
import com.vernu.sms.dtos.RegisterDeviceResponseDTO; |
|||
|
|||
import retrofit2.Call; |
|||
import retrofit2.Callback; |
|||
import retrofit2.Response; |
|||
|
|||
public class VersionTracker { |
|||
private static final String TAG = "VersionTracker"; |
|||
|
|||
/** |
|||
* Checks if the app version has changed since the last time it was run |
|||
* @param context Application context |
|||
* @return true if version has changed, false otherwise |
|||
*/ |
|||
public static boolean hasVersionChanged(Context context) { |
|||
int lastVersionCode = SharedPreferenceHelper.getSharedPreferenceInt( |
|||
context, |
|||
AppConstants.SHARED_PREFS_LAST_VERSION_CODE_KEY, |
|||
-1 |
|||
); |
|||
|
|||
String lastVersionName = SharedPreferenceHelper.getSharedPreferenceString( |
|||
context, |
|||
AppConstants.SHARED_PREFS_LAST_VERSION_NAME_KEY, |
|||
"" |
|||
); |
|||
|
|||
int currentVersionCode = BuildConfig.VERSION_CODE; |
|||
String currentVersionName = BuildConfig.VERSION_NAME; |
|||
|
|||
// First app launch or version changed |
|||
return lastVersionCode == -1 || |
|||
lastVersionCode != currentVersionCode || |
|||
!lastVersionName.equals(currentVersionName); |
|||
} |
|||
|
|||
/** |
|||
* Updates the stored version information with current version |
|||
* @param context Application context |
|||
*/ |
|||
public static void updateStoredVersion(Context context) { |
|||
SharedPreferenceHelper.setSharedPreferenceInt( |
|||
context, |
|||
AppConstants.SHARED_PREFS_LAST_VERSION_CODE_KEY, |
|||
BuildConfig.VERSION_CODE |
|||
); |
|||
|
|||
SharedPreferenceHelper.setSharedPreferenceString( |
|||
context, |
|||
AppConstants.SHARED_PREFS_LAST_VERSION_NAME_KEY, |
|||
BuildConfig.VERSION_NAME |
|||
); |
|||
} |
|||
|
|||
/** |
|||
* Reports current app version to the server |
|||
* @param context Application context |
|||
*/ |
|||
public static void reportVersionToServer(Context context) { |
|||
String deviceId = SharedPreferenceHelper.getSharedPreferenceString( |
|||
context, |
|||
AppConstants.SHARED_PREFS_DEVICE_ID_KEY, |
|||
"" |
|||
); |
|||
|
|||
String apiKey = SharedPreferenceHelper.getSharedPreferenceString( |
|||
context, |
|||
AppConstants.SHARED_PREFS_API_KEY_KEY, |
|||
"" |
|||
); |
|||
|
|||
// If device is not registered or no API key, can't report version |
|||
if (deviceId.isEmpty() || apiKey.isEmpty()) { |
|||
Log.d(TAG, "Can't report version: device not registered or no API key"); |
|||
return; |
|||
} |
|||
|
|||
RegisterDeviceInputDTO updateInput = new RegisterDeviceInputDTO(); |
|||
updateInput.setAppVersionCode(BuildConfig.VERSION_CODE); |
|||
updateInput.setAppVersionName(BuildConfig.VERSION_NAME); |
|||
|
|||
Call<RegisterDeviceResponseDTO> apiCall = ApiManager.getApiService() |
|||
.updateDevice(deviceId, apiKey, updateInput); |
|||
|
|||
apiCall.enqueue(new Callback<RegisterDeviceResponseDTO>() { |
|||
@Override |
|||
public void onResponse(Call<RegisterDeviceResponseDTO> call, Response<RegisterDeviceResponseDTO> response) { |
|||
if (response.isSuccessful()) { |
|||
Log.d(TAG, "Version update reported successfully"); |
|||
updateStoredVersion(context); |
|||
} else { |
|||
Log.e(TAG, "Failed to report version update: " + response.code()); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void onFailure(Call<RegisterDeviceResponseDTO> call, Throwable t) { |
|||
Log.e(TAG, "Error reporting version update: " + t.getMessage()); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> |
|||
<item android:state_checked="true" android:color="?attr/colorPrimary" /> |
|||
<item android:state_enabled="false" android:color="@color/text_secondary" /> |
|||
<item android:color="@color/text_primary" /> |
|||
</selector> |
|||
@ -0,0 +1,6 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> |
|||
<item android:state_checked="true" android:color="?attr/colorPrimary" /> |
|||
<item android:state_enabled="false" android:color="@color/text_secondary" /> |
|||
<item android:color="@color/text_secondary" /> |
|||
</selector> |
|||
@ -0,0 +1,10 @@ |
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
|||
android:width="24dp" |
|||
android:height="24dp" |
|||
android:viewportWidth="24" |
|||
android:viewportHeight="24" |
|||
android:tint="?attr/colorControlNormal"> |
|||
<path |
|||
android:fillColor="@android:color/white" |
|||
android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/> |
|||
</vector> |
|||
@ -0,0 +1,10 @@ |
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android" |
|||
android:width="24dp" |
|||
android:height="24dp" |
|||
android:viewportWidth="24" |
|||
android:viewportHeight="24" |
|||
android:tint="?attr/colorControlNormal"> |
|||
<path |
|||
android:fillColor="@android:color/white" |
|||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/> |
|||
</vector> |
|||
@ -1,303 +1,663 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|||
xmlns:app="http://schemas.android.com/apk/res-auto" |
|||
xmlns:tools="http://schemas.android.com/tools" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:background="@color/background_primary" |
|||
tools:context=".activities.MainActivity"> |
|||
|
|||
|
|||
<ScrollView |
|||
android:id="@+id/scrollView2" |
|||
<!-- Sticky Header Section --> |
|||
<LinearLayout |
|||
android:id="@+id/stickyHeader" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent"> |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
|
|||
<!-- Header Section --> |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
android:background="?attr/colorPrimary" |
|||
android:orientation="vertical" |
|||
android:padding="24dp"> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="Enter your API key or scan the QR code below to get started" |
|||
android:textSize="20dp" |
|||
android:layout_margin="5dp" |
|||
android:text="textbee.dev - sms gateway" |
|||
android:textAlignment="center" |
|||
android:layout_gravity="center" /> |
|||
android:textColor="@color/white" |
|||
android:textSize="22sp" |
|||
android:textStyle="bold" /> |
|||
|
|||
<TextView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginTop="8dp" |
|||
android:layout_marginBottom="8dp" |
|||
android:text="Your ultimate solution for seamless SMS communication" |
|||
android:textAlignment="center" |
|||
android:textColor="@color/white" |
|||
android:textSize="12sp" /> |
|||
</LinearLayout> |
|||
|
|||
<!-- Device Info Card --> |
|||
<androidx.cardview.widget.CardView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginHorizontal="16dp" |
|||
android:layout_marginTop="-24dp" |
|||
android:layout_marginBottom="16dp" |
|||
app:cardBackgroundColor="@color/background_secondary" |
|||
app:cardCornerRadius="8dp" |
|||
app:cardElevation="4dp"> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:background="#ccccccee" |
|||
android:layout_margin="5dp" |
|||
android:orientation="horizontal"> |
|||
android:gravity="center" |
|||
android:orientation="horizontal" |
|||
android:padding="6dp"> |
|||
|
|||
<ImageView |
|||
android:layout_width="48dp" |
|||
android:layout_height="48dp" |
|||
android:layout_gravity="center" |
|||
android:padding="3dp" |
|||
android:src="@drawable/ic_baseline_phone_android_24" |
|||
android:tint="?attr/colorPrimary" /> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="wrap_content" |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center" |
|||
android:layout_marginStart="3dp" |
|||
android:layout_weight="1" |
|||
android:orientation="vertical" |
|||
android:padding="5dp"> |
|||
|
|||
<EditText |
|||
android:id="@+id/apiKeyEditText" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:ems="10" |
|||
android:hint="API Key" |
|||
android:inputType="text" |
|||
android:minHeight="48dp" |
|||
android:textIsSelectable="true" /> |
|||
android:orientation="vertical"> |
|||
|
|||
<EditText |
|||
android:id="@+id/fcmTokenEditText" |
|||
<TextView |
|||
android:id="@+id/deviceBrandAndModelTxt" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:ems="10" |
|||
android:enabled="false" |
|||
android:gravity="start|top" |
|||
android:hint="FCM Token" |
|||
android:inputType="textMultiLine" |
|||
android:visibility="gone" /> |
|||
android:text="Device Brand, Model" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="16sp" |
|||
android:textStyle="bold" /> |
|||
|
|||
<Button |
|||
android:id="@+id/registerDeviceBtn" |
|||
<LinearLayout |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="Register" /> |
|||
android:gravity="center_vertical" |
|||
android:orientation="horizontal"> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="Device ID:" |
|||
android:textColor="@color/text_secondary" |
|||
android:textSize="12sp" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/deviceIdTxt" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginStart="2dp" |
|||
android:text="ae5ce05c05cde3" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="12sp" /> |
|||
|
|||
<ImageButton |
|||
android:id="@+id/copyDeviceIdImgBtn" |
|||
android:layout_width="24dp" |
|||
android:layout_height="24dp" |
|||
android:layout_marginStart="2dp" |
|||
android:background="?attr/selectableItemBackgroundBorderless" |
|||
android:padding="2dp" |
|||
android:src="@drawable/ic_baseline_content_copy_24" |
|||
android:tint="?attr/colorPrimary" /> |
|||
</LinearLayout> |
|||
</LinearLayout> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center" |
|||
android:gravity="center" |
|||
android:orientation="vertical"> |
|||
|
|||
<Button |
|||
android:id="@+id/scanQRButton" |
|||
<Switch |
|||
android:id="@+id/gatewaySwitch" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:minHeight="32dp" /> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_margin="5dp" |
|||
android:drawableTop="@drawable/ic_baseline_qr_code_24" |
|||
android:text="Scan" |
|||
android:textColor="@color/black" |
|||
android:theme="@style/Theme.Design.Light" /> |
|||
android:text="Status" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="14sp" |
|||
android:textStyle="bold" /> |
|||
</LinearLayout> |
|||
</LinearLayout> |
|||
</androidx.cardview.widget.CardView> |
|||
</LinearLayout> |
|||
|
|||
<!-- Scrollable Content --> |
|||
<ScrollView |
|||
android:id="@+id/scrollView2" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="match_parent" |
|||
android:layout_below="@id/stickyHeader"> |
|||
|
|||
<LinearLayout |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
|
|||
<!-- API Key Registration Card --> |
|||
<androidx.cardview.widget.CardView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center" |
|||
android:layout_margin="5dp" |
|||
android:orientation="horizontal"> |
|||
android:layout_marginHorizontal="16dp" |
|||
android:layout_marginBottom="16dp" |
|||
app:cardBackgroundColor="@color/background_secondary" |
|||
app:cardCornerRadius="8dp" |
|||
app:cardElevation="2dp"> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="wrap_content" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
android:orientation="vertical" |
|||
android:padding="16dp"> |
|||
|
|||
<ImageView |
|||
<TextView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginBottom="16dp" |
|||
android:text="Account Information" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="18sp" |
|||
android:textStyle="bold" /> |
|||
|
|||
<!-- Device ID Input Field --> |
|||
<com.google.android.material.textfield.TextInputLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginBottom="16dp" |
|||
android:hint="Device ID (optional)" |
|||
app:boxBackgroundColor="@android:color/transparent" |
|||
app:boxStrokeColor="?attr/colorPrimary" |
|||
app:hintTextColor="?attr/colorPrimary" |
|||
app:endIconMode="custom" |
|||
app:endIconDrawable="@drawable/ic_baseline_edit_24" |
|||
app:endIconTint="?attr/colorPrimary" |
|||
app:helperText="Leaving this field blank will register your device as new. If you have already registered this device previously, please enter the id here." |
|||
app:helperTextTextColor="@color/text_secondary"> |
|||
|
|||
<com.google.android.material.textfield.TextInputEditText |
|||
android:id="@+id/deviceIdEditText" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:inputType="text" |
|||
android:textColor="@color/text_primary" |
|||
android:textIsSelectable="true" /> |
|||
</com.google.android.material.textfield.TextInputLayout> |
|||
|
|||
<com.google.android.material.textfield.TextInputLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginBottom="16dp" |
|||
android:hint="API Key" |
|||
app:boxBackgroundColor="@android:color/transparent" |
|||
app:boxStrokeColor="?attr/colorPrimary" |
|||
app:hintTextColor="?attr/colorPrimary"> |
|||
|
|||
<com.google.android.material.textfield.TextInputEditText |
|||
android:id="@+id/apiKeyEditText" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:inputType="text" |
|||
android:textColor="@color/text_primary" |
|||
android:textIsSelectable="true" /> |
|||
</com.google.android.material.textfield.TextInputLayout> |
|||
|
|||
<EditText |
|||
android:id="@+id/fcmTokenEditText" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center" |
|||
android:layout_margin="5dp" |
|||
android:src="@drawable/ic_baseline_phone_android_24" /> |
|||
android:ems="10" |
|||
android:enabled="false" |
|||
android:gravity="start|top" |
|||
android:hint="FCM Token" |
|||
android:inputType="textMultiLine" |
|||
android:textColor="@color/text_primary" |
|||
android:textColorHint="@color/text_secondary" |
|||
android:visibility="gone" /> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center_vertical" |
|||
android:orientation="horizontal"> |
|||
|
|||
<Button |
|||
android:id="@+id/registerDeviceBtn" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:backgroundTint="?attr/colorPrimary" |
|||
android:paddingHorizontal="24dp" |
|||
android:text="Connect" |
|||
android:textColor="@color/white" /> |
|||
|
|||
<View |
|||
android:layout_width="0dp" |
|||
android:layout_height="1dp" |
|||
android:layout_weight="1" /> |
|||
<Button |
|||
android:id="@+id/scanQRButton" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_margin="5dp" |
|||
android:drawableLeft="@drawable/ic_baseline_qr_code_24" |
|||
android:text="Scan QR" |
|||
android:textColor="@color/black" |
|||
android:theme="@style/Theme.Design.Light" /> |
|||
|
|||
</LinearLayout> |
|||
</LinearLayout> |
|||
</androidx.cardview.widget.CardView> |
|||
|
|||
<!-- Configuration Card --> |
|||
<androidx.cardview.widget.CardView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginHorizontal="16dp" |
|||
android:layout_marginBottom="16dp" |
|||
app:cardBackgroundColor="@color/background_secondary" |
|||
app:cardCornerRadius="8dp" |
|||
app:cardElevation="2dp"> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="wrap_content" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center" |
|||
android:layout_weight="1" |
|||
android:orientation="vertical"> |
|||
android:orientation="vertical" |
|||
android:padding="16dp"> |
|||
|
|||
<TextView |
|||
|
|||
android:id="@+id/deviceBrandAndModelTxt" |
|||
android:layout_width="wrap_content" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="Device Brand, Model" |
|||
android:layout_marginBottom="16dp" |
|||
android:text="Configuration" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="18sp" |
|||
android:textStyle="bold" /> |
|||
|
|||
<!-- Permissions Section --> |
|||
<LinearLayout |
|||
android:layout_width="wrap_content" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:gravity="center" |
|||
android:orientation="horizontal"> |
|||
android:orientation="vertical" |
|||
android:layout_marginBottom="16dp"> |
|||
|
|||
<LinearLayout |
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center" |
|||
android:text="SMS Permissions" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="16sp" |
|||
android:textStyle="bold" /> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="REQUIRED for textbee to function!" |
|||
android:textColor="@android:color/holo_red_dark" |
|||
android:textSize="14sp" |
|||
android:textStyle="bold" |
|||
android:layout_marginBottom="8dp" /> |
|||
|
|||
<Button |
|||
android:id="@+id/grantSMSPermissionBtn" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:backgroundTint="?attr/colorPrimary" |
|||
android:text="Grant SMS Permissions" |
|||
android:textColor="@color/white" |
|||
android:visibility="visible" /> |
|||
</LinearLayout> |
|||
|
|||
<View |
|||
android:layout_width="match_parent" |
|||
android:layout_height="1dp" |
|||
android:background="@color/divider" |
|||
android:layout_marginBottom="16dp" /> |
|||
|
|||
<!-- Receive SMS Toggle --> |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal" |
|||
android:gravity="center_vertical" |
|||
android:layout_marginBottom="16dp"> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_weight="1" |
|||
android:orientation="vertical"> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="Device ID" |
|||
android:textStyle="italic" /> |
|||
android:text="Receive SMS" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="16sp" |
|||
android:textStyle="bold" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/deviceIdTxt" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="ae5ce05c05cde3" /> |
|||
android:text="Toggle to enable SMS receiving" |
|||
android:textColor="@color/text_secondary" |
|||
android:textSize="14sp" /> |
|||
</LinearLayout> |
|||
|
|||
<ImageButton |
|||
|
|||
android:id="@+id/copyDeviceIdImgBtn" |
|||
<Switch |
|||
android:id="@+id/receiveSMSSwitch" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
|
|||
android:src="@drawable/ic_baseline_content_copy_24" /> |
|||
android:minHeight="32dp" /> |
|||
</LinearLayout> |
|||
|
|||
<!-- Sticky Notification Setting --> |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal" |
|||
android:gravity="center_vertical" |
|||
android:layout_marginBottom="16dp"> |
|||
|
|||
</LinearLayout> |
|||
<LinearLayout |
|||
android:layout_width="0dp" |
|||
android:layout_height="wrap_content" |
|||
android:layout_weight="1" |
|||
android:orientation="vertical"> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_gravity="center" |
|||
android:gravity="center" |
|||
android:orientation="vertical"> |
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="Sticky Notification" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="16sp" |
|||
android:textStyle="bold" /> |
|||
|
|||
<Switch |
|||
android:id="@+id/gatewaySwitch" |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal" |
|||
android:gravity="center_vertical"> |
|||
|
|||
<ImageView |
|||
android:layout_width="16dp" |
|||
android:layout_height="16dp" |
|||
android:src="@android:drawable/ic_dialog_info" |
|||
android:tint="?attr/colorPrimary" |
|||
android:layout_marginEnd="4dp" /> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="Prevents app from being killed by the system (optional, but recommended for reliability)" |
|||
android:textColor="@color/text_secondary" |
|||
android:textSize="14sp" /> |
|||
</LinearLayout> |
|||
</LinearLayout> |
|||
|
|||
<Switch |
|||
android:id="@+id/stickyNotificationSwitch" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:minHeight="32dp" /> |
|||
</LinearLayout> |
|||
|
|||
<View |
|||
android:layout_width="match_parent" |
|||
android:layout_height="1dp" |
|||
android:background="@color/divider" |
|||
android:layout_marginBottom="16dp" /> |
|||
|
|||
<!-- Default SIM Selection --> |
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_margin="5dp" |
|||
android:minHeight="32dp" |
|||
android:text="" /> |
|||
android:text="Default SIM" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="16sp" |
|||
android:textStyle="bold" /> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="Status" |
|||
android:textSize="16dp" |
|||
android:textStyle="bold" /> |
|||
android:layout_marginBottom="8dp" |
|||
android:text="Select your preferred SIM for sending SMS" |
|||
android:textColor="@color/text_secondary" |
|||
android:textSize="14sp" /> |
|||
|
|||
<RadioGroup |
|||
android:id="@+id/defaultSimSlotRadioGroup" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical" |
|||
android:layout_marginStart="8dp" /> |
|||
</LinearLayout> |
|||
</LinearLayout> |
|||
</androidx.cardview.widget.CardView> |
|||
|
|||
<LinearLayout |
|||
<!-- How To Use Card --> |
|||
<androidx.cardview.widget.CardView |
|||
android:id="@+id/bottom" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginTop="30dp" |
|||
android:orientation="vertical" |
|||
android:padding="10px"> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="Configuration" |
|||
android:textSize="18sp" |
|||
android:textStyle="bold" /> |
|||
|
|||
<View |
|||
android:layout_width="match_parent" |
|||
android:layout_height="2dp" |
|||
android:background="#000000" /> |
|||
|
|||
<Button |
|||
android:id="@+id/grantSMSPermissionBtn" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="Grant Permissions" |
|||
android:visibility="visible" /> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="TextBee will only work if you grant SMS Permissions" |
|||
android:textSize="14dp" |
|||
android:textStyle="italic" /> |
|||
|
|||
|
|||
<View |
|||
android:layout_width="match_parent" |
|||
android:layout_height="1dp" |
|||
android:background="#000000" /> |
|||
|
|||
<Switch |
|||
android:id="@+id/receiveSMSSwitch" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_margin="5dp" |
|||
android:minHeight="32dp" |
|||
android:text="Receive SMS" /> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="Toggle this if you want to receive SMS" |
|||
android:textSize="14dp" |
|||
android:textStyle="italic" /> |
|||
|
|||
|
|||
<View |
|||
android:layout_width="match_parent" |
|||
android:layout_height="1dp" |
|||
android:background="#000000" /> |
|||
|
|||
android:layout_marginHorizontal="16dp" |
|||
android:layout_marginBottom="16dp" |
|||
app:cardBackgroundColor="@color/background_secondary" |
|||
app:cardCornerRadius="8dp" |
|||
app:cardElevation="2dp"> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
android:orientation="vertical" |
|||
android:padding="16dp"> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="Default SIM" |
|||
android:layout_marginBottom="8dp" |
|||
android:text="How To Use" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="18sp" |
|||
android:textStyle="bold" /> |
|||
|
|||
<RadioGroup |
|||
android:id="@+id/defaultSimSlotRadioGroup" |
|||
android:layout_width="wrap_content" |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"></RadioGroup> |
|||
</LinearLayout> |
|||
android:orientation="horizontal" |
|||
android:layout_marginBottom="8dp"> |
|||
|
|||
<TextView |
|||
android:layout_width="24dp" |
|||
android:layout_height="24dp" |
|||
android:layout_marginEnd="8dp" |
|||
android:background="?attr/colorPrimary" |
|||
android:gravity="center" |
|||
android:text="1" |
|||
android:textColor="@color/white" |
|||
android:textStyle="bold" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/dashboardLinkText" |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="Go to https://textbee.dev/dashboard" |
|||
android:textColor="?attr/colorPrimary" |
|||
android:autoLink="web" |
|||
android:linksClickable="true" |
|||
android:clickable="true" |
|||
android:focusable="true" /> |
|||
</LinearLayout> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="Select your preferred SIM for sending SMS" |
|||
android:textSize="14dp" |
|||
android:textStyle="italic" /> |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal" |
|||
android:layout_marginBottom="8dp"> |
|||
|
|||
<TextView |
|||
android:layout_width="24dp" |
|||
android:layout_height="24dp" |
|||
android:layout_marginEnd="8dp" |
|||
android:background="?attr/colorPrimary" |
|||
android:gravity="center" |
|||
android:text="2" |
|||
android:textColor="@color/white" |
|||
android:textStyle="bold" /> |
|||
|
|||
<TextView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="Click 'Generate API Key / Get Started'" |
|||
android:textColor="@color/text_primary" /> |
|||
</LinearLayout> |
|||
|
|||
</LinearLayout> |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal"> |
|||
|
|||
<TextView |
|||
android:layout_width="24dp" |
|||
android:layout_height="24dp" |
|||
android:layout_marginEnd="8dp" |
|||
android:background="?attr/colorPrimary" |
|||
android:gravity="center" |
|||
android:text="3" |
|||
android:textColor="@color/white" |
|||
android:textStyle="bold" /> |
|||
|
|||
<TextView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="Copy the API key or scan the QR code" |
|||
android:textColor="@color/text_primary" /> |
|||
</LinearLayout> |
|||
</LinearLayout> |
|||
</androidx.cardview.widget.CardView> |
|||
|
|||
<LinearLayout |
|||
android:id="@+id/bottom" |
|||
<!-- App Version Info Card --> |
|||
<androidx.cardview.widget.CardView |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:background="#ccccccee" |
|||
android:orientation="vertical" |
|||
android:layout_marginTop="30dp" |
|||
android:padding="12dp"> |
|||
android:layout_marginHorizontal="16dp" |
|||
android:layout_marginBottom="24dp" |
|||
app:cardBackgroundColor="@color/background_secondary" |
|||
app:cardCornerRadius="8dp" |
|||
app:cardElevation="2dp"> |
|||
|
|||
<TextView |
|||
|
|||
android:layout_width="wrap_content" |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:text="How To Use" |
|||
android:textStyle="bold" /> |
|||
android:orientation="vertical" |
|||
android:padding="16dp"> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="Go to textbee.dev/dashboard and click `generate API Key / Get started`, then copy and paste the API key generated or scan the QR code" /> |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal" |
|||
android:gravity="center_horizontal"> |
|||
|
|||
</LinearLayout> |
|||
</LinearLayout> |
|||
</ScrollView> |
|||
<ImageView |
|||
android:layout_width="32dp" |
|||
android:layout_height="32dp" |
|||
android:src="@drawable/ic_baseline_info_24" |
|||
android:tint="?attr/colorPrimary" |
|||
android:layout_marginEnd="12dp" /> |
|||
|
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="vertical"> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="App Information" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="16sp" |
|||
android:textStyle="bold" /> |
|||
|
|||
</LinearLayout> |
|||
<LinearLayout |
|||
android:layout_width="match_parent" |
|||
android:layout_height="wrap_content" |
|||
android:orientation="horizontal" |
|||
android:layout_marginTop="4dp"> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="Version: " |
|||
android:textColor="@color/text_secondary" |
|||
android:textSize="14sp" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/appVersionNameTxt" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="1.0.0" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="14sp" |
|||
android:textStyle="bold" /> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text=" (Build: " |
|||
android:textColor="@color/text_secondary" |
|||
android:textSize="14sp" |
|||
android:layout_marginStart="4dp" /> |
|||
|
|||
<TextView |
|||
android:id="@+id/appVersionCodeTxt" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text="100" |
|||
android:textColor="@color/text_primary" |
|||
android:textSize="14sp" /> |
|||
|
|||
<TextView |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:text=")" |
|||
android:textColor="@color/text_secondary" |
|||
android:textSize="14sp" /> |
|||
</LinearLayout> |
|||
|
|||
<Button |
|||
android:id="@+id/checkUpdatesBtn" |
|||
android:layout_width="wrap_content" |
|||
android:layout_height="wrap_content" |
|||
android:layout_marginTop="2dp" |
|||
android:text="Check for Updates" |
|||
android:textColor="?attr/colorPrimary" |
|||
android:background="@android:color/transparent" |
|||
android:textAllCaps="false" |
|||
android:paddingHorizontal="0dp" |
|||
style="@style/Widget.AppCompat.Button.Borderless" /> |
|||
</LinearLayout> |
|||
</LinearLayout> |
|||
</LinearLayout> |
|||
</androidx.cardview.widget.CardView> |
|||
</LinearLayout> |
|||
</ScrollView> |
|||
</RelativeLayout> |
|||
|
Before Width: 72 | Height: 72 | Size: 4.0 KiB |
|
Before Width: 162 | Height: 162 | Size: 10 KiB |
|
Before Width: 72 | Height: 72 | Size: 6.2 KiB |
|
Before Width: 48 | Height: 48 | Size: 2.2 KiB |
|
Before Width: 108 | Height: 108 | Size: 5.0 KiB |
|
Before Width: 48 | Height: 48 | Size: 3.5 KiB |
|
Before Width: 96 | Height: 96 | Size: 6.3 KiB |
|
Before Width: 216 | Height: 216 | Size: 18 KiB |
|
Before Width: 96 | Height: 96 | Size: 9.7 KiB |
|
Before Width: 144 | Height: 144 | Size: 12 KiB |
|
Before Width: 324 | Height: 324 | Size: 40 KiB |
|
Before Width: 144 | Height: 144 | Size: 18 KiB |
|
Before Width: 192 | Height: 192 | Size: 21 KiB |
|
Before Width: 432 | Height: 432 | Size: 74 KiB |
|
Before Width: 192 | Height: 192 | Size: 30 KiB |
@ -0,0 +1,17 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<resources> |
|||
<color name="purple_200">#FFBB86FC</color> |
|||
<color name="purple_500">#FF6200EE</color> |
|||
<color name="purple_700">#FF3700B3</color> |
|||
<color name="teal_200">#FF03DAC5</color> |
|||
<color name="teal_700">#FF018786</color> |
|||
<color name="black">#FF000000</color> |
|||
<color name="white">#FFFFFFFF</color> |
|||
|
|||
<!-- Dark mode specific colors --> |
|||
<color name="background_primary">#121212</color> |
|||
<color name="background_secondary">#1E1E1E</color> |
|||
<color name="text_primary">#FFFFFF</color> |
|||
<color name="text_secondary">#B3FFFFFF</color> <!-- 70% white --> |
|||
<color name="divider">#454545</color> |
|||
</resources> |
|||
@ -1,3 +1,3 @@ |
|||
<resources> |
|||
<string name="app_name">TextBee</string> |
|||
<string name="app_name">textbee.dev</string> |
|||
</resources> |
|||
@ -0,0 +1,10 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<resources> |
|||
<style name="RadioButtonStyle" parent="Widget.AppCompat.CompoundButton.RadioButton"> |
|||
<item name="android:textColor">@color/radio_button_text_color</item> |
|||
<item name="android:paddingStart">8dp</item> |
|||
<item name="android:paddingTop">12dp</item> |
|||
<item name="android:paddingBottom">12dp</item> |
|||
<item name="android:buttonTint">?attr/colorPrimary</item> |
|||
</style> |
|||
</resources> |
|||