release mode

This commit is contained in:
MooN 2025-12-04 12:10:30 +06:30
parent 311f7a7e1e
commit d3a8bf6ab5
3 changed files with 140 additions and 134 deletions

View File

@ -14,9 +14,12 @@ android {
applicationId "com.utsmm.kbz.sit" applicationId "com.utsmm.kbz.sit"
minSdk 24 minSdk 24
targetSdk 33 targetSdk 33
versionCode 1 versionCode 10
versionName "1.0" versionName "1.0"
// applicationId "com.utsmm.kbz"
// versionName "1.10"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// // Add CMake configuration // // Add CMake configuration
@ -37,7 +40,7 @@ android {
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
} }

View File

@ -98,9 +98,11 @@ public class SettingsFragment extends DataBindingFragment {
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
try { try {
LogUtil.d(TAG, "onViewCreated called"); LogUtil.d(TAG, "onViewCreated called");
SystemParamsOperation.getInstance().setDemoStatus(false);
// Get the binding from the base class - this is automatically created // Get the binding from the base class - this is automatically created
binding = (FragmentSettingsModernBinding) mBinding; binding = (FragmentSettingsModernBinding) mBinding;
updateDemoSettings();
LogUtil.d(TAG, "Updating settings..."); LogUtil.d(TAG, "Updating settings...");
updateSettings(); updateSettings();
@ -110,6 +112,7 @@ public class SettingsFragment extends DataBindingFragment {
LogUtil.e(TAG, "Error initializing fragment: " + e.getMessage()); LogUtil.e(TAG, "Error initializing fragment: " + e.getMessage());
e.printStackTrace(); e.printStackTrace();
} }
} }
@Override @Override
@ -152,10 +155,10 @@ public class SettingsFragment extends DataBindingFragment {
private void updateDemoSettings() { private void updateDemoSettings() {
boolean isDemo = SystemParamsOperation.getInstance().getDemoStatus(); boolean isDemo = SystemParamsOperation.getInstance().getDemoStatus();
binding.demoSwitch.setChecked(isDemo); // binding.demoSwitch.setChecked(isDemo);
binding.demoSummary.setText(isDemo ? // binding.demoSummary.setText(isDemo ?
"Demo mode active - Test transactions without real processing" : // "Demo mode active - Test transactions without real processing" :
"Simulator mode active - Real transaction processing"); // "Simulator mode active - Real transaction processing");
} }
private void updateAlertSoundSettings() { private void updateAlertSoundSettings() {

View File

@ -465,82 +465,82 @@
<!-- </androidx.cardview.widget.CardView>--> <!-- </androidx.cardview.widget.CardView>-->
<!-- Demo Mode Card --> <!-- Demo Mode Card -->
<androidx.cardview.widget.CardView <!-- <androidx.cardview.widget.CardView-->
android:id="@+id/demoCard" <!-- android:id="@+id/demoCard"-->
android:layout_width="match_parent" <!-- android:layout_width="match_parent"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:layout_marginBottom="12dp" <!-- android:layout_marginBottom="12dp"-->
android:clickable="true" <!-- android:clickable="true"-->
android:foreground="?android:attr/selectableItemBackground" <!-- android:foreground="?android:attr/selectableItemBackground"-->
android:onClick="@{()->click.onDemoClick()}" <!-- android:onClick="@{()->click.onDemoClick()}"-->
app:cardBackgroundColor="@color/white" <!-- app:cardBackgroundColor="@color/white"-->
app:cardCornerRadius="16dp" <!-- app:cardCornerRadius="16dp"-->
app:cardElevation="2dp"> <!-- app:cardElevation="2dp">-->
<LinearLayout <!-- <LinearLayout-->
android:layout_width="match_parent" <!-- android:layout_width="match_parent"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:gravity="center_vertical" <!-- android:gravity="center_vertical"-->
android:orientation="horizontal" <!-- android:orientation="horizontal"-->
android:padding="20dp"> <!-- android:padding="20dp">-->
<androidx.cardview.widget.CardView <!-- <androidx.cardview.widget.CardView-->
android:layout_width="48dp" <!-- android:layout_width="48dp"-->
android:layout_height="48dp" <!-- android:layout_height="48dp"-->
android:layout_marginEnd="16dp" <!-- android:layout_marginEnd="16dp"-->
app:cardBackgroundColor="@color/colorPrimary" <!-- app:cardBackgroundColor="@color/colorPrimary"-->
app:cardCornerRadius="24dp" <!-- app:cardCornerRadius="24dp"-->
app:cardElevation="0dp"> <!-- app:cardElevation="0dp">-->
<ImageView <!-- <ImageView-->
android:layout_width="24dp" <!-- android:layout_width="24dp"-->
android:layout_height="24dp" <!-- android:layout_height="24dp"-->
android:layout_gravity="center" <!-- android:layout_gravity="center"-->
android:src="@drawable/ic_swap" <!-- android:src="@drawable/ic_swap"-->
app:tint="@color/white" /> <!-- app:tint="@color/white" />-->
</androidx.cardview.widget.CardView> <!-- </androidx.cardview.widget.CardView>-->
<LinearLayout <!-- <LinearLayout-->
android:layout_width="0dp" <!-- android:layout_width="0dp"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:layout_weight="1" <!-- android:layout_weight="1"-->
android:orientation="vertical"> <!-- android:orientation="vertical">-->
<TextView <!-- <TextView-->
android:layout_width="wrap_content" <!-- android:layout_width="wrap_content"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:fontFamily="@font/rubik_medium" <!-- android:fontFamily="@font/rubik_medium"-->
android:text="Demo Mode" <!-- android:text="Demo Mode"-->
android:textColor="@color/colorTextTitle" <!-- android:textColor="@color/colorTextTitle"-->
android:textSize="18sp" <!-- android:textSize="18sp"-->
android:textStyle="bold" <!-- android:textStyle="bold"-->
tools:fontFamily="sans-serif-medium" /> <!-- tools:fontFamily="sans-serif-medium" />-->
<TextView <!-- <TextView-->
android:id="@+id/demoSummary" <!-- android:id="@+id/demoSummary"-->
android:layout_width="wrap_content" <!-- android:layout_width="wrap_content"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:layout_marginTop="2dp" <!-- android:layout_marginTop="2dp"-->
android:fontFamily="@font/rubik_regular" <!-- android:fontFamily="@font/rubik_regular"-->
android:text="Demo mode active - Test transactions" <!-- android:text="Demo mode active - Test transactions"-->
android:textColor="@color/colorTextContent" <!-- android:textColor="@color/colorTextContent"-->
android:textSize="14sp" <!-- android:textSize="14sp"-->
tools:fontFamily="sans-serif" /> <!-- tools:fontFamily="sans-serif" />-->
</LinearLayout> <!-- </LinearLayout>-->
<Switch <!-- <Switch-->
android:id="@+id/demoSwitch" <!-- android:id="@+id/demoSwitch"-->
android:layout_width="wrap_content" <!-- android:layout_width="wrap_content"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:layout_marginStart="8dp" <!-- android:layout_marginStart="8dp"-->
android:clickable="false" <!-- android:clickable="false"-->
android:focusable="false" /> <!-- android:focusable="false" />-->
</LinearLayout> <!-- </LinearLayout>-->
</androidx.cardview.widget.CardView> <!-- </androidx.cardview.widget.CardView>-->
<!-- Sound Alerts Card --> <!-- Sound Alerts Card -->
<!-- <androidx.cardview.widget.CardView--> <!-- <androidx.cardview.widget.CardView-->
@ -900,7 +900,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="12dp" android:layout_marginBottom="12dp"
android:clickable="true" android:clickable="false"
android:foreground="?android:attr/selectableItemBackground" android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="@color/white" app:cardBackgroundColor="@color/white"
app:cardCornerRadius="16dp" app:cardCornerRadius="16dp"
@ -1045,79 +1045,79 @@
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<!-- TMS Configuration Card --> <!-- TMS Configuration Card -->
<androidx.cardview.widget.CardView <!-- <androidx.cardview.widget.CardView-->
android:id="@+id/tmsConfigCard" <!-- android:id="@+id/tmsConfigCard"-->
android:layout_width="match_parent" <!-- android:layout_width="match_parent"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:layout_marginBottom="12dp" <!-- android:layout_marginBottom="12dp"-->
android:clickable="true" <!-- android:clickable="true"-->
android:foreground="?android:attr/selectableItemBackground" <!-- android:foreground="?android:attr/selectableItemBackground"-->
android:onClick="@{()->click.onTmsConfigClick()}" <!-- android:onClick="@{()->click.onTmsConfigClick()}"-->
app:cardBackgroundColor="@color/white" <!-- app:cardBackgroundColor="@color/white"-->
app:cardCornerRadius="16dp" <!-- app:cardCornerRadius="16dp"-->
app:cardElevation="2dp"> <!-- app:cardElevation="2dp">-->
<LinearLayout <!-- <LinearLayout-->
android:layout_width="match_parent" <!-- android:layout_width="match_parent"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:gravity="center_vertical" <!-- android:gravity="center_vertical"-->
android:orientation="horizontal" <!-- android:orientation="horizontal"-->
android:padding="20dp"> <!-- android:padding="20dp">-->
<androidx.cardview.widget.CardView <!-- <androidx.cardview.widget.CardView-->
android:layout_width="48dp" <!-- android:layout_width="48dp"-->
android:layout_height="48dp" <!-- android:layout_height="48dp"-->
android:layout_marginEnd="16dp" <!-- android:layout_marginEnd="16dp"-->
app:cardBackgroundColor="@color/colorPrimary" <!-- app:cardBackgroundColor="@color/colorPrimary"-->
app:cardCornerRadius="24dp" <!-- app:cardCornerRadius="24dp"-->
app:cardElevation="0dp"> <!-- app:cardElevation="0dp">-->
<ImageView <!-- <ImageView-->
android:layout_width="24dp" <!-- android:layout_width="24dp"-->
android:layout_height="24dp" <!-- android:layout_height="24dp"-->
android:layout_gravity="center" <!-- android:layout_gravity="center"-->
android:src="@drawable/ic_config" <!-- android:src="@drawable/ic_config"-->
app:tint="@color/white" /> <!-- app:tint="@color/white" />-->
</androidx.cardview.widget.CardView> <!-- </androidx.cardview.widget.CardView>-->
<LinearLayout <!-- <LinearLayout-->
android:layout_width="0dp" <!-- android:layout_width="0dp"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:layout_weight="1" <!-- android:layout_weight="1"-->
android:orientation="vertical"> <!-- android:orientation="vertical">-->
<TextView <!-- <TextView-->
android:layout_width="wrap_content" <!-- android:layout_width="wrap_content"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:fontFamily="@font/rubik_medium" <!-- android:fontFamily="@font/rubik_medium"-->
android:text="TMS Configuration" <!-- android:text="TMS Configuration"-->
android:textColor="@color/colorTextTitle" <!-- android:textColor="@color/colorTextTitle"-->
android:textSize="18sp" <!-- android:textSize="18sp"-->
android:textStyle="bold" <!-- android:textStyle="bold"-->
tools:fontFamily="sans-serif-medium" /> <!-- tools:fontFamily="sans-serif-medium" />-->
<TextView <!-- <TextView-->
android:layout_width="wrap_content" <!-- android:layout_width="wrap_content"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:layout_marginTop="2dp" <!-- android:layout_marginTop="2dp"-->
android:fontFamily="@font/rubik_regular" <!-- android:fontFamily="@font/rubik_regular"-->
android:text="Configure terminal management system" <!-- android:text="Configure terminal management system"-->
android:textColor="@color/colorTextContent" <!-- android:textColor="@color/colorTextContent"-->
android:textSize="14sp" <!-- android:textSize="14sp"-->
tools:fontFamily="sans-serif" /> <!-- tools:fontFamily="sans-serif" />-->
</LinearLayout> <!-- </LinearLayout>-->
<ImageView <!-- <ImageView-->
android:layout_width="20dp" <!-- android:layout_width="20dp"-->
android:layout_height="20dp" <!-- android:layout_height="20dp"-->
android:src="@drawable/ic_right_arrow" <!-- android:src="@drawable/ic_right_arrow"-->
app:tint="@color/colorPrimary" /> <!-- app:tint="@color/colorPrimary" />-->
</LinearLayout> <!-- </LinearLayout>-->
</androidx.cardview.widget.CardView> <!-- </androidx.cardview.widget.CardView>-->
</LinearLayout> </LinearLayout>