mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 06:17:57 +01:00 
			
		
		
		
	Restore transparent status bars, allow WebView app bar to scroll away
This commit is contained in:
		| @@ -14,6 +14,7 @@ import eu.kanade.tachiyomi.source.SourceManager | ||||
| import eu.kanade.tachiyomi.source.online.HttpSource | ||||
| import eu.kanade.tachiyomi.ui.base.activity.BaseActivity | ||||
| import eu.kanade.tachiyomi.util.WebViewClientCompat | ||||
| import eu.kanade.tachiyomi.util.getResourceColor | ||||
| import kotlinx.android.synthetic.main.webview_activity.toolbar | ||||
| import kotlinx.android.synthetic.main.webview_activity.webview | ||||
| import uy.kohesive.injekt.injectLazy | ||||
| @@ -29,6 +30,10 @@ class WebViewActivity : BaseActivity() { | ||||
|         super.onCreate(savedInstanceState) | ||||
|         setContentView(R.layout.webview_activity) | ||||
|  | ||||
|         // Manually override status bar color since it's normally transparent with the app themes | ||||
|         // This is needed to hide the app bar when it scrolls up | ||||
|         window.statusBarColor = getResourceColor(R.attr.colorPrimaryDark) | ||||
|  | ||||
|         title = intent.extras?.getString(TITLE_KEY) | ||||
|         setSupportActionBar(toolbar) | ||||
|         supportActionBar?.setDisplayHomeAsUpEnabled(true) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user