WIP andorid auto

This commit is contained in:
h4h13 2019-08-02 18:38:47 +05:30
parent c2759e3ec0
commit 6acac46d45
9 changed files with 79 additions and 26 deletions

View file

@ -55,7 +55,9 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP
return contentView
}
override fun onCreate(savedInstanceState: Bundle?) {
override fun onCreate(
savedInstanceState: Bundle?
) {
setDrawUnderStatusBar()
super.onCreate(savedInstanceState)
@ -64,12 +66,9 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP
getBottomNavigationView().setOnNavigationItemSelectedListener {
PreferenceUtil.getInstance().lastPage = it.itemId
selectedFragment(it.itemId)
true
}
if (savedInstanceState == null) {
selectedFragment(PreferenceUtil.getInstance().lastPage)
} else {

View file

@ -169,7 +169,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
slidingLayout.panelHeight = 0
collapsePanel()
} else {
if (!MusicPlayerRemote.playingQueue.isEmpty()) {
if (MusicPlayerRemote.playingQueue.isNotEmpty()) {
slidingLayout.panelHeight = if (bottomNavigationView.visibility == View.VISIBLE) heightOfBarWithTabs else heightOfBar
}
}

View file

@ -173,6 +173,7 @@ abstract class AbsThemeActivity : ATHActivity(), Runnable {
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
or View.SYSTEM_UI_FLAG_FULLSCREEN
or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY)
if (PreferenceUtil.getInstance().fullScreenMode) {
window.decorView.systemUiVisibility = flags
}