improving the way default widget color is set
This commit is contained in:
parent
851493865b
commit
1aade9c055
|
@ -52,7 +52,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.7.8'
|
implementation 'com.simplemobiletools:commons:5.7.9'
|
||||||
implementation 'joda-time:joda-time:2.10.1'
|
implementation 'joda-time:joda-time:2.10.1'
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
|
|
||||||
|
|
|
@ -68,12 +68,7 @@ class WidgetListConfigureActivity : SimpleActivity() {
|
||||||
updateColors()
|
updateColors()
|
||||||
|
|
||||||
mBgColor = config.widgetBgColor
|
mBgColor = config.widgetBgColor
|
||||||
if (mBgColor == 1) {
|
mBgAlpha = Color.alpha(mBgColor) / 255.toFloat()
|
||||||
mBgColor = Color.BLACK
|
|
||||||
mBgAlpha = .2f
|
|
||||||
} else {
|
|
||||||
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))
|
||||||
config_bg_seekbar.setOnSeekBarChangeListener(bgSeekbarChangeListener)
|
config_bg_seekbar.setOnSeekBarChangeListener(bgSeekbarChangeListener)
|
||||||
|
|
|
@ -77,12 +77,7 @@ class WidgetMonthlyConfigureActivity : SimpleActivity(), MonthlyCalendar {
|
||||||
updateColors()
|
updateColors()
|
||||||
|
|
||||||
mBgColor = config.widgetBgColor
|
mBgColor = config.widgetBgColor
|
||||||
if (mBgColor == 1) {
|
mBgAlpha = Color.alpha(mBgColor) / 255.toFloat()
|
||||||
mBgColor = Color.BLACK
|
|
||||||
mBgAlpha = .2f
|
|
||||||
} else {
|
|
||||||
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))
|
||||||
config_bg_seekbar.setOnSeekBarChangeListener(bgSeekbarChangeListener)
|
config_bg_seekbar.setOnSeekBarChangeListener(bgSeekbarChangeListener)
|
||||||
|
|
Loading…
Reference in New Issue