mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-08 08:49:55 +00:00
Update: Move layout setup into onStart for activities
This commit is contained in:
parent
039db23a64
commit
edf55849d1
@ -81,13 +81,14 @@ class MainActivityX : AppCompatActivity() {
|
||||
handleIntent(intent)
|
||||
}
|
||||
setContentView(binding.root)
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
setSupportActionBar(toolbar)
|
||||
|
||||
if (Android.sdk(28) && !Android.Device.isHuaweiEmui) {
|
||||
toolbar.menu.setGroupDividerEnabled(true)
|
||||
}
|
||||
|
||||
toolbar.isFocusableInTouchMode = true
|
||||
binding.collapsingToolbar.title = getString(R.string.application_name)
|
||||
|
||||
@ -104,10 +105,6 @@ class MainActivityX : AppCompatActivity() {
|
||||
supportFragmentManager.addFragmentOnAttachListener { _, _ ->
|
||||
hideKeyboard()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
syncConnection.bind(this)
|
||||
}
|
||||
|
||||
|
@ -73,9 +73,11 @@ class PrefsActivityX : AppCompatActivity() {
|
||||
handleIntent(intent)
|
||||
}
|
||||
setContentView(binding.root)
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
setSupportActionBar(toolbar)
|
||||
|
||||
toolbar.isFocusableInTouchMode = true
|
||||
binding.collapsingToolbar.title = getString(R.string.settings)
|
||||
|
||||
@ -92,10 +94,6 @@ class PrefsActivityX : AppCompatActivity() {
|
||||
supportFragmentManager.addFragmentOnAttachListener { _, _ ->
|
||||
hideKeyboard()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
syncConnection.bind(this)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user