mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-08 16:59: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)
|
handleIntent(intent)
|
||||||
}
|
}
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStart() {
|
||||||
|
super.onStart()
|
||||||
setSupportActionBar(toolbar)
|
setSupportActionBar(toolbar)
|
||||||
|
|
||||||
if (Android.sdk(28) && !Android.Device.isHuaweiEmui) {
|
if (Android.sdk(28) && !Android.Device.isHuaweiEmui) {
|
||||||
toolbar.menu.setGroupDividerEnabled(true)
|
toolbar.menu.setGroupDividerEnabled(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
toolbar.isFocusableInTouchMode = true
|
toolbar.isFocusableInTouchMode = true
|
||||||
binding.collapsingToolbar.title = getString(R.string.application_name)
|
binding.collapsingToolbar.title = getString(R.string.application_name)
|
||||||
|
|
||||||
@ -104,10 +105,6 @@ class MainActivityX : AppCompatActivity() {
|
|||||||
supportFragmentManager.addFragmentOnAttachListener { _, _ ->
|
supportFragmentManager.addFragmentOnAttachListener { _, _ ->
|
||||||
hideKeyboard()
|
hideKeyboard()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
override fun onStart() {
|
|
||||||
super.onStart()
|
|
||||||
syncConnection.bind(this)
|
syncConnection.bind(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,9 +73,11 @@ class PrefsActivityX : AppCompatActivity() {
|
|||||||
handleIntent(intent)
|
handleIntent(intent)
|
||||||
}
|
}
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStart() {
|
||||||
|
super.onStart()
|
||||||
setSupportActionBar(toolbar)
|
setSupportActionBar(toolbar)
|
||||||
|
|
||||||
toolbar.isFocusableInTouchMode = true
|
toolbar.isFocusableInTouchMode = true
|
||||||
binding.collapsingToolbar.title = getString(R.string.settings)
|
binding.collapsingToolbar.title = getString(R.string.settings)
|
||||||
|
|
||||||
@ -92,10 +94,6 @@ class PrefsActivityX : AppCompatActivity() {
|
|||||||
supportFragmentManager.addFragmentOnAttachListener { _, _ ->
|
supportFragmentManager.addFragmentOnAttachListener { _, _ ->
|
||||||
hideKeyboard()
|
hideKeyboard()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
override fun onStart() {
|
|
||||||
super.onStart()
|
|
||||||
syncConnection.bind(this)
|
syncConnection.bind(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user