Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created August 25, 2022 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeforfun-jp/e4621de7dfc9f4616ae5ef7891bdd840 to your computer and use it in GitHub Desktop.
Save codeforfun-jp/e4621de7dfc9f4616ae5ef7891bdd840 to your computer and use it in GitHub Desktop.
【Kotlin】How to create a context menu 1
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_home"
android:title="ホーム" />
<item
android:id="@+id/action_user"
android:title="アカウント" />
<item
android:id="@+id/action_map"
android:title="地図" />
<item android:title="お問い合わせ">
<menu>
<item
android:id="@+id/action_tel"
android:icon="@drawable/ic_baseline_phone_24"
android:title="電話" />
<item
android:id="@+id/action_mail"
android:icon="@drawable/ic_baseline_email_24"
android:title="メール" />
</menu>
</item>
</menu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment