File tree Expand file tree Collapse file tree
pio/src/main/java/com/projectkr/shell Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,14 +49,14 @@ class MainActivity : AppCompatActivity() {
4949 ThemeModeState .switchTheme(this )
5050 binding = ActivityMainBinding .inflate(layoutInflater)
5151 setContentView(binding.root)
52+ applyTheme()
5253
5354 val toolbar = findViewById<View >(R .id.toolbar) as Toolbar
5455 setSupportActionBar(toolbar)
5556 setTitle(R .string.app_name)
56-
5757 krScriptConfig = KrScriptConfig ()
58-
5958 binding.mainTabhost.setup()
59+
6060 val tabIconHelper = TabIconHelper (binding.mainTabhost, this )
6161 if (tabIconHelper != null ) {
6262 if (hasRoot && krScriptConfig.allowHomePage) {
@@ -125,6 +125,15 @@ class MainActivity : AppCompatActivity() {
125125 })
126126 }
127127
128+ private fun applyTheme () {
129+ WindowCompat .setDecorFitsSystemWindows(window, false )
130+ window.statusBarColor = Color .TRANSPARENT
131+ window.navigationBarColor = ContextCompat .getColor(this , R .color.splash_bg_color)
132+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .M ) {
133+ WindowCompat .getInsetsController(window, window.decorView).isAppearanceLightStatusBars = true
134+ }
135+ }
136+
128137 private fun getItems (pageNode : PageNode ): ArrayList <NodeInfoBase >? {
129138 var items: ArrayList <NodeInfoBase >? = null
130139
You can’t perform that action at this time.
0 commit comments