move statusBar check to top

This commit is contained in:
Chumva 2018-08-28 12:36:45 +03:00
parent 6ed6dee124
commit 2c707e1dac

View file

@ -57,6 +57,11 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
if (Build.VERSION.SDK_INT >= 23) {
AndroidUtils.enterToTransparentFullScreen(this)
} else if (Build.VERSION.SDK_INT >= 19) {
AndroidUtils.enterToTranslucentFullScreen(this)
}
setContentView(R.layout.activity_main) setContentView(R.layout.activity_main)
paused = false paused = false
@ -67,11 +72,6 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene
adapter = ViewPagerAdapter(supportFragmentManager) adapter = ViewPagerAdapter(supportFragmentManager)
} }
if (Build.VERSION.SDK_INT >= 23) {
AndroidUtils.enterToTransparentFullScreen(this)
} else if (Build.VERSION.SDK_INT >= 19) {
AndroidUtils.enterToTranslucentFullScreen(this)
}
bottomNav = findViewById<BottomNavigationView>(R.id.bottom_navigation).apply { bottomNav = findViewById<BottomNavigationView>(R.id.bottom_navigation).apply {
setOnNavigationItemSelectedListener { setOnNavigationItemSelectedListener {
var pos = -1 var pos = -1