updating widget config screens

This commit is contained in:
tibbi 2022-12-25 19:13:44 +01:00
parent d8200ebe79
commit 53439d843d
4 changed files with 10 additions and 38 deletions

View File

@ -55,7 +55,6 @@ class WidgetAnalogueConfigureActivity : SimpleActivity() {
override fun onResume() {
super.onResume()
setupToolbar(config_toolbar)
if (mFeatureLockedDialog != null && isOrWasThankYouInstalled()) {
mFeatureLockedDialog?.dismissDialog()
}
@ -63,6 +62,10 @@ class WidgetAnalogueConfigureActivity : SimpleActivity() {
private fun initVariables() {
mBgColor = config.widgetBgColor
if (mBgColor == resources.getColor(R.color.default_widget_bg_color) && config.isUsingSystemTheme) {
mBgColor = resources.getColor(R.color.you_primary_color, theme)
}
mBgAlpha = Color.alpha(mBgColor) / 255.toFloat()
mBgColorWithoutTransparency = Color.rgb(Color.red(mBgColor), Color.green(mBgColor), Color.blue(mBgColor))

View File

@ -64,7 +64,6 @@ class WidgetDigitalConfigureActivity : SimpleActivity() {
override fun onResume() {
super.onResume()
setupToolbar(config_toolbar)
if (mFeatureLockedDialog != null && isOrWasThankYouInstalled()) {
mFeatureLockedDialog?.dismissDialog()
}
@ -80,6 +79,10 @@ class WidgetDigitalConfigureActivity : SimpleActivity() {
updateBackgroundColor()
mTextColor = config.widgetTextColor
if (mTextColor == resources.getColor(R.color.default_widget_text_color) && config.isUsingSystemTheme) {
mTextColor = resources.getColor(R.color.you_primary_color, theme)
}
updateTextColor()
}

View File

@ -1,33 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:id="@+id/config_coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/config_app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/config_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/color_primary"
app:title="@string/app_launcher_name"
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
</com.google.android.material.appbar.AppBarLayout>
<RelativeLayout
android:id="@+id/config_analogue_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_margin="@dimen/activity_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
android:layout_margin="@dimen/activity_margin">
<RelativeLayout
android:id="@+id/config_analogue_wrapper"

View File

@ -1,33 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:id="@+id/config_coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/config_app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/config_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/color_primary"
app:title="@string/app_launcher_name"
app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />
</com.google.android.material.appbar.AppBarLayout>
<RelativeLayout
android:id="@+id/config_digital_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_margin="@dimen/activity_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
android:layout_margin="@dimen/activity_margin">
<RelativeLayout
android:id="@+id/config_digital_wrapper"