Skip to content

Commit 2572f7c

Browse files
committed
Properly update sleep timer color on resume
1 parent 543362c commit 2572f7c

File tree

1 file changed

+4
-0
lines changed
  • app/src/main/kotlin/com/simplemobiletools/flashlight/activities

1 file changed

+4
-0
lines changed

app/src/main/kotlin/com/simplemobiletools/flashlight/activities/MainActivity.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import android.content.Context
66
import android.content.Intent
77
import android.content.pm.ActivityInfo
88
import android.content.pm.ShortcutInfo
9+
import android.graphics.drawable.ColorDrawable
910
import android.graphics.drawable.Icon
1011
import android.graphics.drawable.LayerDrawable
1112
import android.os.Bundle
@@ -114,6 +115,9 @@ class MainActivity : SimpleActivity() {
114115
}
115116
}
116117

118+
binding.sleepTimerHolder.background = ColorDrawable(getProperBackgroundColor())
119+
binding.sleepTimerStop.applyColorFilter(getProperTextColor())
120+
117121
requestedOrientation = if (config.forcePortraitMode) ActivityInfo.SCREEN_ORIENTATION_PORTRAIT else ActivityInfo.SCREEN_ORIENTATION_SENSOR
118122
invalidateOptionsMenu()
119123

0 commit comments

Comments
 (0)