Skip to content

Commit 6ecbba5

Browse files
committed
hide keyboard before launching settings
1 parent 61560c8 commit 6ecbba5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ android {
6464
}
6565

6666
dependencies {
67-
implementation 'com.github.SimpleMobileTools:Simple-Commons:91d4508df6'
67+
implementation 'com.github.SimpleMobileTools:Simple-Commons:feb676128e'
6868

6969
kapt 'androidx.room:room-compiler:2.3.0'
7070
implementation 'androidx.room:room-runtime:2.3.0'

app/src/main/kotlin/com/simplemobiletools/keyboard/activities/MainActivity.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,18 @@ class MainActivity : SimpleActivity() {
5555

5656
override fun onOptionsItemSelected(item: MenuItem): Boolean {
5757
when (item.itemId) {
58-
R.id.settings -> startActivity(Intent(applicationContext, SettingsActivity::class.java))
58+
R.id.settings -> launchSettings()
5959
R.id.about -> launchAbout()
6060
else -> return super.onOptionsItemSelected(item)
6161
}
6262
return true
6363
}
6464

65+
private fun launchSettings() {
66+
hideKeyboard()
67+
startActivity(Intent(applicationContext, SettingsActivity::class.java))
68+
}
69+
6570
private fun launchAbout() {
6671
val licenses = LICENSE_GSON
6772

0 commit comments

Comments
 (0)