hide keyboard before launching settings
This commit is contained in:
parent
61560c8799
commit
6ecbba5b8d
|
@ -64,7 +64,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:91d4508df6'
|
implementation 'com.github.SimpleMobileTools:Simple-Commons:feb676128e'
|
||||||
|
|
||||||
kapt 'androidx.room:room-compiler:2.3.0'
|
kapt 'androidx.room:room-compiler:2.3.0'
|
||||||
implementation 'androidx.room:room-runtime:2.3.0'
|
implementation 'androidx.room:room-runtime:2.3.0'
|
||||||
|
|
|
@ -55,13 +55,18 @@ class MainActivity : SimpleActivity() {
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.settings -> startActivity(Intent(applicationContext, SettingsActivity::class.java))
|
R.id.settings -> launchSettings()
|
||||||
R.id.about -> launchAbout()
|
R.id.about -> launchAbout()
|
||||||
else -> return super.onOptionsItemSelected(item)
|
else -> return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun launchSettings() {
|
||||||
|
hideKeyboard()
|
||||||
|
startActivity(Intent(applicationContext, SettingsActivity::class.java))
|
||||||
|
}
|
||||||
|
|
||||||
private fun launchAbout() {
|
private fun launchAbout() {
|
||||||
val licenses = LICENSE_GSON
|
val licenses = LICENSE_GSON
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue