android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
- <Button android:id="@+id/selection_menu"
- android:divider="?android:attr/listDividerAlertDialog"
- style="?android:attr/borderlessButtonStyle"
- android:singleLine="true"
- android:gravity="left|center_vertical"
+
+ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
- android:layout_height="match_parent" />
- <ImageView android:layout_marginLeft="8dip"
+ android:layout_height="match_parent">
+ <ImageView android:layout_gravity="right"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:src="@drawable/dropdown_ic_arrow_normal_holo_dark" />
+ <Button android:id="@+id/selection_menu"
+ android:divider="?android:attr/listDividerAlertDialog"
+ style="?android:attr/borderlessButtonStyle"
+ android:singleLine="true"
+ android:gravity="left|center_vertical"
+ android:paddingRight="25dip"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent" />
+ </FrameLayout>
+ <ImageView android:layout_marginLeft="16dip"
android:layout_marginRight="8dip"
android:layout_width="wrap_content"
android:layout_height="match_parent"
public DropDownMenu(Context context, Button button, int menuId,
OnMenuItemClickListener listener) {
mButton = button;
- mButton.setBackgroundDrawable(context.getResources().getDrawable(
- R.drawable.dropdown_normal_holo_dark));
mPopupMenu = new PopupMenu(context, mButton);
mMenu = mPopupMenu.getMenu();
mPopupMenu.getMenuInflater().inflate(menuId, mMenu);