Skip to content

Commit

Permalink
Fix softkeyboard dismiss issue
Browse files Browse the repository at this point in the history
  • Loading branch information
levinli303 committed Apr 30, 2021
1 parent 13415e4 commit b21a5c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="space.celestia.mobilecelestia"
android:versionCode="175"
android:versionCode="177"
android:versionName="1.3.1">

<uses-feature android:glEsVersion="0x00020000" android:required="true" />
Expand All @@ -28,7 +28,6 @@
android:theme="@style/AppTheme">
<activity
android:name="space.celestia.mobilecelestia.MainActivity"
android:windowSoftInputMode="stateHidden|adjustNothing"
android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
android:screenOrientation="sensorLandscape"
android:launchMode="singleInstance"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,20 @@ class FavoriteItemRecyclerViewAdapter private constructor(
}
return@setOnLongClickListener true
}
holder.itemView.setOnContextClickListener {
val popup = PopupMenu(it.context, it)
setupPopupMenu(popup, actions) { menuItem ->
when (menuItem) {
FavoriteItemAction.Delete -> {
listener?.deleteFavoriteItem(children.indexOf(item))
}
FavoriteItemAction.Rename -> {
listener?.renameFavoriteItem(item)
}
}
}
return@setOnContextClickListener true
}
} else {
holder.itemView.setOnLongClickListener(null)
}
Expand Down

0 comments on commit b21a5c0

Please sign in to comment.