Skip to content

Commit

Permalink
fix(options): Add icons to popup menu for the main apps (jkuester#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
khwolf committed Dec 22, 2023
1 parent 9df1a51 commit 1a9a92f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class CustomiseAppsFragment : BaseFragment(), OnShitDoneToAppsListener {
private fun showPopupMenu(view: View): PopupMenu {
val popup = PopupMenu(requireContext(), view)
popup.menuInflater.inflate(R.menu.customise_apps_popup_menu, popup.menu)
popup.setForceShowIcon(true)
popup.show()
return popup
}
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_reset_app.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<path
android:fillColor="?attr/colorAccent"
android:pathData="M14,12c0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2 0.9,2 2,2 2,-0.9 2,-2zM12,3c-4.97,0 -9,4.03 -9,9L0,12l4,4 4,-4L5,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.51,0 -2.91,-0.49 -4.06,-1.3l-1.42,1.44C8.04,20.3 9.94,21 12,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9z"/>
</vector>
9 changes: 6 additions & 3 deletions app/src/main/res/menu/customise_apps_popup_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@

<item
android:id="@+id/ca_menu_rename"
android:title="@string/menu_rename" />
android:title="@string/menu_rename"
android:icon="@drawable/ic_rename_app" />
<item
android:id="@+id/ca_menu_remove"
android:title="@string/menu_remove" />
android:title="@string/menu_remove"
android:icon="@drawable/ic_uninstall_app" />
<item
android:id="@+id/ca_menu_reset"
android:title="@string/menu_reset"/>
android:title="@string/menu_reset"
android:icon="@drawable/ic_reset_app" />
</menu>

0 comments on commit 1a9a92f

Please sign in to comment.