このような
ボタンをクリックするとメニューがドロップダウンします。以前ListView
は実装していたのですが、3 点ボタンの取り付け方とポップアップ メニューの追加方法がわかりません。
これが私のlist_item.xmlです
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="4dp"
android:layout_marginLeft="6dp"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp"
android:background="@drawable/card_background" >
<TextView
android:id="@+id/tvMain"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:layout_weight="1"
android:textColor="@android:color/primary_text_light" />
</LinearLayout>
</FrameLayout>
そして、私のアプリのスクリーンショット:
https://www.dropbox.com/s/h2ko2ctfn5ohmf9/Screenshot_2013-09-10-15-43-57.png