mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-02-07 23:48:43 +01:00
updating widget config screens
This commit is contained in:
parent
d8200ebe79
commit
53439d843d
@ -55,7 +55,6 @@ class WidgetAnalogueConfigureActivity : SimpleActivity() {
|
|||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
setupToolbar(config_toolbar)
|
|
||||||
if (mFeatureLockedDialog != null && isOrWasThankYouInstalled()) {
|
if (mFeatureLockedDialog != null && isOrWasThankYouInstalled()) {
|
||||||
mFeatureLockedDialog?.dismissDialog()
|
mFeatureLockedDialog?.dismissDialog()
|
||||||
}
|
}
|
||||||
@ -63,6 +62,10 @@ class WidgetAnalogueConfigureActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun initVariables() {
|
private fun initVariables() {
|
||||||
mBgColor = config.widgetBgColor
|
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()
|
mBgAlpha = Color.alpha(mBgColor) / 255.toFloat()
|
||||||
mBgColorWithoutTransparency = Color.rgb(Color.red(mBgColor), Color.green(mBgColor), Color.blue(mBgColor))
|
mBgColorWithoutTransparency = Color.rgb(Color.red(mBgColor), Color.green(mBgColor), Color.blue(mBgColor))
|
||||||
|
|
||||||
|
@ -64,7 +64,6 @@ class WidgetDigitalConfigureActivity : SimpleActivity() {
|
|||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
setupToolbar(config_toolbar)
|
|
||||||
if (mFeatureLockedDialog != null && isOrWasThankYouInstalled()) {
|
if (mFeatureLockedDialog != null && isOrWasThankYouInstalled()) {
|
||||||
mFeatureLockedDialog?.dismissDialog()
|
mFeatureLockedDialog?.dismissDialog()
|
||||||
}
|
}
|
||||||
@ -80,6 +79,10 @@ class WidgetDigitalConfigureActivity : SimpleActivity() {
|
|||||||
updateBackgroundColor()
|
updateBackgroundColor()
|
||||||
|
|
||||||
mTextColor = config.widgetTextColor
|
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()
|
updateTextColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,33 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/config_coordinator"
|
android:id="@+id/config_coordinator"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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
|
<RelativeLayout
|
||||||
android:id="@+id/config_analogue_holder"
|
android:id="@+id/config_analogue_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_margin="@dimen/activity_margin"
|
android:layout_margin="@dimen/activity_margin">
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/config_analogue_wrapper"
|
android:id="@+id/config_analogue_wrapper"
|
||||||
|
@ -1,33 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/config_coordinator"
|
android:id="@+id/config_coordinator"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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
|
<RelativeLayout
|
||||||
android:id="@+id/config_digital_holder"
|
android:id="@+id/config_digital_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_margin="@dimen/activity_margin"
|
android:layout_margin="@dimen/activity_margin">
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/config_digital_wrapper"
|
android:id="@+id/config_digital_wrapper"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user