Style new popup widgets.

Change-Id: I208ed292afd9919071778baa9ea61d7ca9e7743c
This commit is contained in:
Adam Powell
2010-09-14 16:15:02 -07:00
parent a29d8394f1
commit 0b2d306e70
9 changed files with 228 additions and 5 deletions

View File

@@ -163,7 +163,7 @@ public class ListPopupWindow {
* @param attrs Attributes from inflating parent views used to style the popup.
*/
public ListPopupWindow(Context context, AttributeSet attrs) {
this(context, attrs, 0, 0);
this(context, attrs, com.android.internal.R.attr.listPopupWindowStyle, 0);
}
/**

View File

@@ -104,7 +104,7 @@ public class MenuBuilder implements Menu {
com.android.internal.R.layout.list_menu_item_layout,
com.android.internal.R.layout.list_menu_item_layout,
com.android.internal.R.layout.action_menu_item_layout,
com.android.internal.R.layout.list_menu_item_layout,
com.android.internal.R.layout.popup_menu_item_layout,
};
private static final int[] sCategoryToOrder = new int[] {

View File

@@ -72,9 +72,7 @@ public class MenuPopupHelper implements AdapterView.OnItemClickListener, View.On
}
public void show() {
// TODO Use a style from the theme here
mPopup = new ListPopupWindow(mContext, null, 0,
com.android.internal.R.style.Widget_Spinner);
mPopup = new ListPopupWindow(mContext, null, com.android.internal.R.attr.popupMenuStyle);
mPopup.setOnItemClickListener(this);
mPopup.setOnDismissListener(mDismissListener);