Skip to content

Commit 3348740

Browse files
committed
fix #107, hide the top status bar at bright display mode
1 parent 591697e commit 3348740

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
</intent-filter>
4747
</activity>
4848

49-
<activity android:name=".activities.BrightDisplayActivity"/>
49+
<activity
50+
android:name=".activities.BrightDisplayActivity"
51+
android:theme="@style/FullScreenTheme"/>
5052

5153
<activity
5254
android:name=".activities.SettingsActivity"

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ import kotlinx.android.synthetic.main.activity_bright_display.*
1313

1414
class BrightDisplayActivity : SimpleActivity() {
1515
override fun onCreate(savedInstanceState: Bundle?) {
16+
window.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or
17+
WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or
18+
WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON or
19+
WindowManager.LayoutParams.FLAG_FULLSCREEN)
20+
21+
useDynamicTheme = false
1622
super.onCreate(savedInstanceState)
1723
setContentView(R.layout.activity_bright_display)
1824
supportActionBar?.hide()

app/src/main/res/values/styles.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@
22

33
<style name="AppTheme" parent="AppTheme.Base"/>
44

5+
<style name="FullScreenTheme" parent="AppTheme">
6+
<item name="android:windowContentOverlay">@null</item>
7+
<item name="android:windowTranslucentNavigation">true</item>
8+
</style>
9+
510
</resources>

0 commit comments

Comments
 (0)