close home screen popup menu on move event

This commit is contained in:
tibbi
2022-09-20 12:29:13 +02:00
parent 7ae72b04da
commit 97fd224619
3 changed files with 15 additions and 6 deletions

View File

@ -36,9 +36,9 @@ fun Activity.uninstallApp(packageName: String) {
}
}
fun Activity.handleAppIconPopupMenu(anchorView: View, appPackageName: String) {
fun Activity.handleAppIconPopupMenu(anchorView: View, appPackageName: String): PopupMenu {
val contextTheme = ContextThemeWrapper(this, getPopupMenuTheme())
PopupMenu(contextTheme, anchorView, Gravity.TOP or Gravity.END).apply {
return PopupMenu(contextTheme, anchorView, Gravity.TOP or Gravity.END).apply {
inflate(R.menu.menu_app_icon)
setOnMenuItemClickListener { item ->
when (item.itemId) {