diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a163b3729c..54c7295df1 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -55,6 +55,7 @@ android:resource="@xml/automotive_app_desc" /> @@ -62,7 +63,8 @@ - + @@ -72,12 +74,18 @@ - - - - - - + + + + + + MODE_NIGHT_YES + sp.getString(R.string.value_light_theme, "light") -> MODE_NIGHT_NO + else -> MODE_NIGHT_FOLLOW_SYSTEM + } + AppCompatDelegate.setDefaultNightMode(mode) + } + + override fun onStop() { + compositeDisposable.dispose() + } +} diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.kt b/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.kt index 090b9ae07d..4e9d5539b2 100644 --- a/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.kt @@ -50,6 +50,8 @@ class SetupWizardActivity : NoSplashAppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + // temp while switch is not public + setTheme(R.style.AppTheme) update(applicationContext) binding = ActivitySetupwizardBinding.inflate(layoutInflater) setContentView(binding.root) diff --git a/app/src/main/res/layout/actions_fragment.xml b/app/src/main/res/layout/actions_fragment.xml index e8362b0524..d7b04c933f 100644 --- a/app/src/main/res/layout/actions_fragment.xml +++ b/app/src/main/res/layout/actions_fragment.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/fragmentbackground" tools:context=".plugins.general.actions.ActionsFragment"> diff --git a/app/src/main/res/layout/activity_logsetting.xml b/app/src/main/res/layout/activity_logsetting.xml index 303a9fd6df..cb1573ecf8 100644 --- a/app/src/main/res/layout/activity_logsetting.xml +++ b/app/src/main/res/layout/activity_logsetting.xml @@ -16,7 +16,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" - android:background="@color/activity_title_background" + android:background="?attr/activity_title_backgroundColor" android:orientation="horizontal" android:padding="5dp"> diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 6edf1fa105..cf57888fd5 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -11,7 +11,7 @@ android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="@color/colorPrimary" + android:background="?attr/colorPrimary" app:contentInsetEndWithActions="48dp" app:contentInsetStartWithNavigation="48dp" android:elevation="4dp"> @@ -21,9 +21,9 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/transparent" - app:tabIndicatorColor="@color/tabSelectedTextColor" - app:tabTextColor="@color/tabTextColor" - app:tabSelectedTextColor="@color/tabSelectedTextColor" + app:tabIndicatorColor="?attr/tabSelectedTextColor" + app:tabTextColor="?attr/tabTextColor" + app:tabSelectedTextColor="?attr/tabSelectedTextColor" app:tabMode="scrollable" /> @@ -58,8 +58,8 @@ app:itemBackground="?attr/selectableItemBackground" android:fitsSystemWindows="true" android:layout_gravity="start" - app:itemIconTint="@android:color/white" - app:itemTextColor="@android:color/white"/> + app:itemIconTint="?android:textColorPrimary" + app:itemTextColor="?android:textColorPrimary"/> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_preferences.xml b/app/src/main/res/layout/activity_preferences.xml index eef88c7bad..d4a7c61fc7 100644 --- a/app/src/main/res/layout/activity_preferences.xml +++ b/app/src/main/res/layout/activity_preferences.xml @@ -9,6 +9,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/filter" + android:textColorHint="?attr/colorOnPrimary" app:endIconMode="clear_text"> + android:inputType="text" + android:background="@color/transparent"/> diff --git a/app/src/main/res/layout/activity_profilehelper.xml b/app/src/main/res/layout/activity_profilehelper.xml index d87aca5296..1b41867d16 100644 --- a/app/src/main/res/layout/activity_profilehelper.xml +++ b/app/src/main/res/layout/activity_profilehelper.xml @@ -16,7 +16,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="10dp" - android:background="@color/defaultbackground" + android:background="?attr/defaultbackground" android:orientation="horizontal"> + android:textColorHint="?attr/tabBgColorSelected" + app:boxStrokeColor="?attr/tabBgColorSelected"> @@ -112,6 +113,7 @@ android:id="@+id/tdd" android:layout_width="130dp" android:layout_height="40dp" + android:layout_marginBottom="2dp" app:customContentDescription="@string/tdd_total" /> @@ -134,6 +136,7 @@ android:id="@+id/weight" android:layout_width="130dp" android:layout_height="40dp" + android:layout_marginBottom="2dp" app:customContentDescription="@string/weight_label" /> @@ -205,8 +208,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/selected_profile" - android:textColorHint="@color/white" - app:boxStrokeColor="@color/white"> + app:boxStrokeColor="?attr/boxStrokeColor"> + app:boxStrokeColor="?attr/boxStrokeColor"> @@ -74,8 +73,7 @@ android:layout_height="wrap_content" android:background="@android:color/transparent" android:onClick="showPreviousPage" - android:text="@string/previous_button" - android:textColor="#FFFFFF" /> + android:text="@string/previous_button" /> + android:text="@string/next_button" />