summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.xml24
-rwxr-xr-xcore/java/android/webkit/GeolocationPermissions.java2
-rw-r--r--core/java/android/webkit/WebViewCore.java6
-rw-r--r--core/java/com/android/internal/widget/ActionBarView.java84
-rw-r--r--core/res/res/drawable-hdpi/ic_ab_back_holo_dark.pngbin743 -> 644 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_ab_back_holo_light.pngbin742 -> 657 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_dark.pngbin693 -> 693 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_light.pngbin736 -> 736 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_dark.pngbin916 -> 547 bytes
-rw-r--r--core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_light.pngbin896 -> 588 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_down_disabled_focused_holo_dark.pngbin0 -> 555 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_down_disabled_focused_holo_light.pngbin0 -> 565 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_down_disabled_holo_dark.pngbin0 -> 458 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_down_disabled_holo_light.pngbin0 -> 472 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_down_focused_holo_dark.pngbin0 -> 732 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_down_focused_holo_light.pngbin0 -> 664 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_down_longpressed_holo_dark.pngbin0 -> 734 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_down_longpressed_holo_light.pngbin0 -> 573 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_down_normal_holo_dark.pngbin0 -> 473 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_down_normal_holo_light.pngbin0 -> 493 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_down_pressed_holo_dark.pngbin0 -> 743 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_down_pressed_holo_light.pngbin0 -> 537 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_up_disabled_focused_holo_dark.pngbin0 -> 546 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_up_disabled_focused_holo_light.pngbin0 -> 552 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_up_disabled_holo_dark.pngbin0 -> 448 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_up_disabled_holo_light.pngbin0 -> 455 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_up_focused_holo_dark.pngbin0 -> 672 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_up_focused_holo_light.pngbin0 -> 656 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_up_longpressed_holo_dark.pngbin0 -> 757 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_up_longpressed_holo_light.pngbin0 -> 560 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_up_normal_holo_dark.pngbin0 -> 457 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_up_normal_holo_light.pngbin0 -> 470 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_up_pressed_holo_dark.pngbin0 -> 756 bytes
-rw-r--r--core/res/res/drawable-hdpi/timepicker_up_pressed_holo_light.pngbin0 -> 525 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_ab_back_holo_dark.pngbin614 -> 500 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_ab_back_holo_light.pngbin614 -> 507 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_dark.pngbin545 -> 545 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_light.pngbin552 -> 552 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_dark.pngbin660 -> 444 bytes
-rw-r--r--core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_light.pngbin697 -> 443 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_down_disabled_focused_holo_dark.pngbin0 -> 588 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_down_disabled_focused_holo_light.pngbin0 -> 582 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_down_disabled_holo_dark.pngbin0 -> 491 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_down_disabled_holo_light.pngbin0 -> 456 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_down_focused_holo_dark.pngbin0 -> 728 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_down_focused_holo_light.pngbin0 -> 666 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_down_longpressed_holo_dark.pngbin0 -> 718 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_down_longpressed_holo_light.pngbin0 -> 517 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_down_normal_holo_dark.pngbin0 -> 492 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_down_normal_holo_light.pngbin0 -> 481 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_down_pressed_holo_dark.pngbin0 -> 737 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_down_pressed_holo_light.pngbin0 -> 495 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_up_disabled_focused_holo_dark.pngbin0 -> 571 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_up_disabled_focused_holo_light.pngbin0 -> 559 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_up_disabled_holo_dark.pngbin0 -> 484 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_up_disabled_holo_light.pngbin0 -> 458 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_up_focused_holo_dark.pngbin0 -> 711 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_up_focused_holo_light.pngbin0 -> 652 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_up_longpressed_holo_dark.pngbin0 -> 703 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_up_longpressed_holo_light.pngbin0 -> 512 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_up_normal_holo_dark.pngbin0 -> 472 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_up_normal_holo_light.pngbin0 -> 472 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_up_pressed_holo_dark.pngbin0 -> 717 bytes
-rw-r--r--core/res/res/drawable-mdpi/timepicker_up_pressed_holo_light.pngbin0 -> 480 bytes
-rw-r--r--core/res/res/layout/action_bar_home.xml34
-rwxr-xr-xcore/res/res/values/attrs.xml7
-rw-r--r--core/res/res/values/ids.xml1
-rw-r--r--core/res/res/values/public.xml2
-rw-r--r--core/res/res/values/styles.xml6
-rw-r--r--core/res/res/values/themes.xml2
-rw-r--r--docs/html/guide/topics/resources/menu-resource.jd144
71 files changed, 163 insertions, 149 deletions
diff --git a/api/current.xml b/api/current.xml
index afe86fb..a738761 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -4838,17 +4838,6 @@
visibility="public"
>
</field>
-<field name="homeLayout"
- type="int"
- transient="false"
- volatile="false"
- value="16843566"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="horizontalDivider"
type="int"
transient="false"
@@ -13415,17 +13404,6 @@
visibility="public"
>
</field>
-<field name="up"
- type="int"
- transient="false"
- volatile="false"
- value="16908334"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="widget_frame"
type="int"
transient="false"
@@ -247076,7 +247054,7 @@
deprecated="not deprecated"
visibility="public"
>
-<parameter name="arg0" type="T">
+<parameter name="t" type="T">
</parameter>
</method>
</interface>
diff --git a/core/java/android/webkit/GeolocationPermissions.java b/core/java/android/webkit/GeolocationPermissions.java
index 4565b75..5d54180 100755
--- a/core/java/android/webkit/GeolocationPermissions.java
+++ b/core/java/android/webkit/GeolocationPermissions.java
@@ -146,7 +146,7 @@ public final class GeolocationPermissions {
boolean allowed = nativeGetAllowed(origin);
Map retValues = new HashMap<String, Object>();
retValues.put(CALLBACK, callback);
- retValues.put(ALLOWED, new Boolean(allowed));
+ retValues.put(ALLOWED, Boolean.valueOf(allowed));
postUIMessage(Message.obtain(null, RETURN_ALLOWED, retValues));
} break;
case CLEAR:
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 8c515db..17f0a97 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -285,7 +285,9 @@ final class WebViewCore {
int fileType = MediaFile.getFileTypeForMimeType(mimeType);
return MediaFile.isAudioFileType(fileType)
|| MediaFile.isVideoFileType(fileType)
- || MediaFile.isPlayListFileType(fileType);
+ || MediaFile.isPlayListFileType(fileType)
+ // The following is not in Media framework, but it's supported.
+ || (mimeType != null && mimeType.startsWith("video/m4v"));
}
/**
@@ -2054,7 +2056,7 @@ final class WebViewCore {
}
if (mWebView != null) {
Message msg = Message.obtain(mWebView.mPrivateHandler,
- WebView.SCROLL_BY_MSG_ID, dx, dy, new Boolean(animate));
+ WebView.SCROLL_BY_MSG_ID, dx, dy, Boolean.valueOf(animate));
if (mDrawIsScheduled) {
mEventHub.sendMessage(Message.obtain(null,
EventHub.MESSAGE_RELAY, msg));
diff --git a/core/java/com/android/internal/widget/ActionBarView.java b/core/java/com/android/internal/widget/ActionBarView.java
index b382cee..e18f58f 100644
--- a/core/java/com/android/internal/widget/ActionBarView.java
+++ b/core/java/com/android/internal/widget/ActionBarView.java
@@ -82,10 +82,12 @@ public class ActionBarView extends ViewGroup {
private Drawable mIcon;
private Drawable mLogo;
private Drawable mDivider;
+ private Drawable mHomeAsUpIndicator;
- private View mHomeLayout;
- private View mHomeAsUpView;
+ private LinearLayout mHomeLayout;
+ private ImageView mHomeAsUpView;
private ImageView mIconView;
+ private ImageView mLogoView;
private LinearLayout mTitleLayout;
private TextView mTitleView;
private TextView mSubtitleView;
@@ -170,15 +172,18 @@ public class ActionBarView extends ViewGroup {
}
}
- final LayoutInflater inflater = LayoutInflater.from(context);
+ mHomeLayout = new LinearLayout(context, null,
+ com.android.internal.R.attr.actionButtonStyle);
+ mHomeLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
+ LayoutParams.MATCH_PARENT));
- final int homeResId = a.getResourceId(
- com.android.internal.R.styleable.ActionBar_homeLayout, 0);
+ mHomeAsUpIndicator = a.getDrawable(R.styleable.ActionBar_homeAsUpIndicator);
- mHomeLayout = inflater.inflate(homeResId, this, false);
-
- mHomeAsUpView = mHomeLayout.findViewById(com.android.internal.R.id.up);
- mIconView = (ImageView) mHomeLayout.findViewById(com.android.internal.R.id.home);
+ mHomeAsUpView = new ImageView(context);
+ mHomeAsUpView.setImageDrawable(mHomeAsUpIndicator);
+ mHomeAsUpView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
+ LayoutParams.MATCH_PARENT));
+ mHomeLayout.addView(mHomeAsUpView);
Drawable background = a.getDrawable(R.styleable.ActionBar_background);
if (background != null) {
@@ -197,7 +202,8 @@ public class ActionBarView extends ViewGroup {
final int customNavId = a.getResourceId(R.styleable.ActionBar_customNavigationLayout, 0);
if (customNavId != 0) {
- mCustomNavView = (View) inflater.inflate(customNavId, this, false);
+ LayoutInflater inflater = LayoutInflater.from(context);
+ mCustomNavView = (View) inflater.inflate(customNavId, null);
mNavigationMode = ActionBar.NAVIGATION_MODE_STANDARD;
setDisplayOptions(mDisplayOptions | ActionBar.DISPLAY_SHOW_CUSTOM);
}
@@ -369,12 +375,13 @@ public class ActionBarView extends ViewGroup {
if ((flagsChanged & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
mHomeAsUpView.setVisibility((options & ActionBar.DISPLAY_HOME_AS_UP) != 0
- ? VISIBLE : INVISIBLE);
+ ? VISIBLE : GONE);
}
- if ((flagsChanged & ActionBar.DISPLAY_USE_LOGO) != 0) {
- final boolean logoVis = mLogo != null && (options & ActionBar.DISPLAY_USE_LOGO) != 0;
- mIconView.setImageDrawable(logoVis ? mLogo : mIcon);
+ if (mLogoView != null && (flagsChanged & ActionBar.DISPLAY_USE_LOGO) != 0) {
+ final boolean logoVis = (options & ActionBar.DISPLAY_USE_LOGO) != 0;
+ mLogoView.setVisibility(logoVis ? VISIBLE : GONE);
+ mIconView.setVisibility(logoVis ? GONE : VISIBLE);
}
if ((flagsChanged & ActionBar.DISPLAY_SHOW_TITLE) != 0) {
@@ -524,8 +531,50 @@ public class ActionBarView extends ViewGroup {
protected void onFinishInflate() {
super.onFinishInflate();
+ final Context context = getContext();
+
+ if (mLogo != null) {
+ mLogoView = new ImageView(context);
+ mLogoView.setScaleType(ImageView.ScaleType.CENTER);
+ mLogoView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
+ LayoutParams.MATCH_PARENT));
+ mLogoView.setImageDrawable(mLogo);
+ mLogoView.setVisibility((mDisplayOptions & ActionBar.DISPLAY_USE_LOGO) != 0
+ ? VISIBLE : GONE);
+ mHomeLayout.addView(mLogoView);
+ }
+
+ if (mIcon != null) {
+ mIconView = new ImageView(context, null,
+ com.android.internal.R.attr.actionButtonStyle);
+ mIconView.setScaleType(ImageView.ScaleType.CENTER);
+ mIconView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
+ LayoutParams.MATCH_PARENT));
+ mIconView.setImageDrawable(mIcon);
+ mIconView.setVisibility(
+ (mDisplayOptions & ActionBar.DISPLAY_USE_LOGO) == 0 || mLogo == null
+ ? VISIBLE : GONE);
+ mHomeLayout.addView(mIconView);
+ }
+
addView(mHomeLayout);
+ switch (mNavigationMode) {
+ case ActionBar.NAVIGATION_MODE_STANDARD:
+ if (mLogoView == null) {
+ initTitle();
+ }
+ break;
+
+ case ActionBar.NAVIGATION_MODE_LIST:
+ throw new UnsupportedOperationException(
+ "Inflating list navigation isn't supported yet!");
+
+ case ActionBar.NAVIGATION_MODE_TABS:
+ throw new UnsupportedOperationException(
+ "Inflating tab navigation isn't supported yet!");
+ }
+
if (mCustomNavView != null && (mDisplayOptions & ActionBar.DISPLAY_SHOW_CUSTOM) != 0) {
final ViewParent parent = mCustomNavView.getParent();
if (parent != this) {
@@ -604,11 +653,8 @@ public class ActionBarView extends ViewGroup {
int rightOfCenter = leftOfCenter;
if (mHomeLayout.getVisibility() != GONE) {
- mHomeLayout.measure(MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST),
- MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
- final int homeWidth = mHomeLayout.getMeasuredWidth();
- availableWidth -= homeWidth;
- leftOfCenter -= homeWidth;
+ availableWidth = measureChildView(mHomeLayout, availableWidth, childSpecHeight, 0);
+ leftOfCenter -= mHomeLayout.getMeasuredWidth();
}
if (mMenuView != null) {
diff --git a/core/res/res/drawable-hdpi/ic_ab_back_holo_dark.png b/core/res/res/drawable-hdpi/ic_ab_back_holo_dark.png
index b4079db..a8da981 100644
--- a/core/res/res/drawable-hdpi/ic_ab_back_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_ab_back_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_ab_back_holo_light.png b/core/res/res/drawable-hdpi/ic_ab_back_holo_light.png
index 09e83e4..af0f308 100644
--- a/core/res/res/drawable-hdpi/ic_ab_back_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_ab_back_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_dark.png
index 3ecaa9d..061f80a 100644
--- a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_light.png
index 40009af..d818806 100644
--- a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_dark.png b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_dark.png
index e21f534..8563c1a 100644
--- a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_dark.png
+++ b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_light.png b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_light.png
index 9108fa1..1cd2384 100644
--- a/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_light.png
+++ b/core/res/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_down_disabled_focused_holo_dark.png b/core/res/res/drawable-hdpi/timepicker_down_disabled_focused_holo_dark.png
new file mode 100644
index 0000000..6fbd7d2
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_down_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_down_disabled_focused_holo_light.png b/core/res/res/drawable-hdpi/timepicker_down_disabled_focused_holo_light.png
new file mode 100644
index 0000000..3a4cdec
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_down_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_down_disabled_holo_dark.png b/core/res/res/drawable-hdpi/timepicker_down_disabled_holo_dark.png
new file mode 100644
index 0000000..b1c3991
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_down_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_down_disabled_holo_light.png b/core/res/res/drawable-hdpi/timepicker_down_disabled_holo_light.png
new file mode 100644
index 0000000..6fbce8c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_down_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_down_focused_holo_dark.png b/core/res/res/drawable-hdpi/timepicker_down_focused_holo_dark.png
new file mode 100644
index 0000000..3bb4c29
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_down_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_down_focused_holo_light.png b/core/res/res/drawable-hdpi/timepicker_down_focused_holo_light.png
new file mode 100644
index 0000000..8f02162
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_down_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_down_longpressed_holo_dark.png b/core/res/res/drawable-hdpi/timepicker_down_longpressed_holo_dark.png
new file mode 100644
index 0000000..8f57d2c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_down_longpressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_down_longpressed_holo_light.png b/core/res/res/drawable-hdpi/timepicker_down_longpressed_holo_light.png
new file mode 100644
index 0000000..df6f76b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_down_longpressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_down_normal_holo_dark.png b/core/res/res/drawable-hdpi/timepicker_down_normal_holo_dark.png
new file mode 100644
index 0000000..a47bf31
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_down_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_down_normal_holo_light.png b/core/res/res/drawable-hdpi/timepicker_down_normal_holo_light.png
new file mode 100644
index 0000000..04046aa
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_down_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_down_pressed_holo_dark.png b/core/res/res/drawable-hdpi/timepicker_down_pressed_holo_dark.png
new file mode 100644
index 0000000..b6021e0
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_down_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_down_pressed_holo_light.png b/core/res/res/drawable-hdpi/timepicker_down_pressed_holo_light.png
new file mode 100644
index 0000000..0f38d6b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_down_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_up_disabled_focused_holo_dark.png b/core/res/res/drawable-hdpi/timepicker_up_disabled_focused_holo_dark.png
new file mode 100644
index 0000000..14a4e31
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_up_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_up_disabled_focused_holo_light.png b/core/res/res/drawable-hdpi/timepicker_up_disabled_focused_holo_light.png
new file mode 100644
index 0000000..21a2ac1
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_up_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_up_disabled_holo_dark.png b/core/res/res/drawable-hdpi/timepicker_up_disabled_holo_dark.png
new file mode 100644
index 0000000..1a1da57
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_up_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_up_disabled_holo_light.png b/core/res/res/drawable-hdpi/timepicker_up_disabled_holo_light.png
new file mode 100644
index 0000000..a242c80
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_up_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_up_focused_holo_dark.png b/core/res/res/drawable-hdpi/timepicker_up_focused_holo_dark.png
new file mode 100644
index 0000000..50045e4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_up_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_up_focused_holo_light.png b/core/res/res/drawable-hdpi/timepicker_up_focused_holo_light.png
new file mode 100644
index 0000000..659b3c7
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_up_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_up_longpressed_holo_dark.png b/core/res/res/drawable-hdpi/timepicker_up_longpressed_holo_dark.png
new file mode 100644
index 0000000..9112530
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_up_longpressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_up_longpressed_holo_light.png b/core/res/res/drawable-hdpi/timepicker_up_longpressed_holo_light.png
new file mode 100644
index 0000000..21aa7f7
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_up_longpressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_up_normal_holo_dark.png b/core/res/res/drawable-hdpi/timepicker_up_normal_holo_dark.png
new file mode 100644
index 0000000..d145975
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_up_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_up_normal_holo_light.png b/core/res/res/drawable-hdpi/timepicker_up_normal_holo_light.png
new file mode 100644
index 0000000..167bab7
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_up_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_up_pressed_holo_dark.png b/core/res/res/drawable-hdpi/timepicker_up_pressed_holo_dark.png
new file mode 100644
index 0000000..2844c3f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_up_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/timepicker_up_pressed_holo_light.png b/core/res/res/drawable-hdpi/timepicker_up_pressed_holo_light.png
new file mode 100644
index 0000000..9d83038
--- /dev/null
+++ b/core/res/res/drawable-hdpi/timepicker_up_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_ab_back_holo_dark.png b/core/res/res/drawable-mdpi/ic_ab_back_holo_dark.png
index 08a8eca..7aae741 100644
--- a/core/res/res/drawable-mdpi/ic_ab_back_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_ab_back_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_ab_back_holo_light.png b/core/res/res/drawable-mdpi/ic_ab_back_holo_light.png
index 0ffafd8..66ef51c 100644
--- a/core/res/res/drawable-mdpi/ic_ab_back_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_ab_back_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_dark.png
index c369e6f..6f87b11 100644
--- a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_light.png
index a4df2bf..04dac38 100644
--- a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_dark.png b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_dark.png
index a7389c9..5580af6 100644
--- a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_dark.png
+++ b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_light.png b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_light.png
index 87e41ac..fc2081a 100644
--- a/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_light.png
+++ b/core/res/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_down_disabled_focused_holo_dark.png b/core/res/res/drawable-mdpi/timepicker_down_disabled_focused_holo_dark.png
new file mode 100644
index 0000000..d86534c
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_down_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_down_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/timepicker_down_disabled_focused_holo_light.png
new file mode 100644
index 0000000..6ae5d4b
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_down_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_down_disabled_holo_dark.png b/core/res/res/drawable-mdpi/timepicker_down_disabled_holo_dark.png
new file mode 100644
index 0000000..fd578b6
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_down_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_down_disabled_holo_light.png b/core/res/res/drawable-mdpi/timepicker_down_disabled_holo_light.png
new file mode 100644
index 0000000..a0caaa9
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_down_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_down_focused_holo_dark.png b/core/res/res/drawable-mdpi/timepicker_down_focused_holo_dark.png
new file mode 100644
index 0000000..f6f4ed2
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_down_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_down_focused_holo_light.png b/core/res/res/drawable-mdpi/timepicker_down_focused_holo_light.png
new file mode 100644
index 0000000..2591adb
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_down_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_down_longpressed_holo_dark.png b/core/res/res/drawable-mdpi/timepicker_down_longpressed_holo_dark.png
new file mode 100644
index 0000000..efee099
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_down_longpressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_down_longpressed_holo_light.png b/core/res/res/drawable-mdpi/timepicker_down_longpressed_holo_light.png
new file mode 100644
index 0000000..f7b09de
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_down_longpressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_down_normal_holo_dark.png b/core/res/res/drawable-mdpi/timepicker_down_normal_holo_dark.png
new file mode 100644
index 0000000..76f13a6
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_down_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_down_normal_holo_light.png b/core/res/res/drawable-mdpi/timepicker_down_normal_holo_light.png
new file mode 100644
index 0000000..cb8e764
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_down_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_down_pressed_holo_dark.png b/core/res/res/drawable-mdpi/timepicker_down_pressed_holo_dark.png
new file mode 100644
index 0000000..7c0d0bc
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_down_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_down_pressed_holo_light.png b/core/res/res/drawable-mdpi/timepicker_down_pressed_holo_light.png
new file mode 100644
index 0000000..9d7ff6b
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_down_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_up_disabled_focused_holo_dark.png b/core/res/res/drawable-mdpi/timepicker_up_disabled_focused_holo_dark.png
new file mode 100644
index 0000000..cfdfd174
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_up_disabled_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_up_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/timepicker_up_disabled_focused_holo_light.png
new file mode 100644
index 0000000..43bdf1d
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_up_disabled_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_up_disabled_holo_dark.png b/core/res/res/drawable-mdpi/timepicker_up_disabled_holo_dark.png
new file mode 100644
index 0000000..2ffe46b
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_up_disabled_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_up_disabled_holo_light.png b/core/res/res/drawable-mdpi/timepicker_up_disabled_holo_light.png
new file mode 100644
index 0000000..51bb2d0
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_up_disabled_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_up_focused_holo_dark.png b/core/res/res/drawable-mdpi/timepicker_up_focused_holo_dark.png
new file mode 100644
index 0000000..dece157
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_up_focused_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_up_focused_holo_light.png b/core/res/res/drawable-mdpi/timepicker_up_focused_holo_light.png
new file mode 100644
index 0000000..384cb32
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_up_focused_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_up_longpressed_holo_dark.png b/core/res/res/drawable-mdpi/timepicker_up_longpressed_holo_dark.png
new file mode 100644
index 0000000..84ec4f7
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_up_longpressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_up_longpressed_holo_light.png b/core/res/res/drawable-mdpi/timepicker_up_longpressed_holo_light.png
new file mode 100644
index 0000000..318befc
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_up_longpressed_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_up_normal_holo_dark.png b/core/res/res/drawable-mdpi/timepicker_up_normal_holo_dark.png
new file mode 100644
index 0000000..d97a832
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_up_normal_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_up_normal_holo_light.png b/core/res/res/drawable-mdpi/timepicker_up_normal_holo_light.png
new file mode 100644
index 0000000..19d75e5
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_up_normal_holo_light.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_up_pressed_holo_dark.png b/core/res/res/drawable-mdpi/timepicker_up_pressed_holo_dark.png
new file mode 100644
index 0000000..1189e5c
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_up_pressed_holo_dark.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/timepicker_up_pressed_holo_light.png b/core/res/res/drawable-mdpi/timepicker_up_pressed_holo_light.png
new file mode 100644
index 0000000..9f283ab
--- /dev/null
+++ b/core/res/res/drawable-mdpi/timepicker_up_pressed_holo_light.png
Binary files differ
diff --git a/core/res/res/layout/action_bar_home.xml b/core/res/res/layout/action_bar_home.xml
deleted file mode 100644
index e8b5637..0000000
--- a/core/res/res/layout/action_bar_home.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:background="?android:attr/selectableItemBackground">
- <ImageView android:id="@android:id/up"
- android:src="?android:attr/homeAsUpIndicator"
- android:layout_gravity="top|left"
- android:visibility="invisible"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
- <ImageView android:id="@android:id/home"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:paddingLeft="16dip"
- android:paddingRight="16dip"
- android:layout_gravity="center"
- android:scaleType="center" />
-</FrameLayout>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 651bfea..9d54a80 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -607,9 +607,6 @@
<!-- SearchView dropdown background -->
<attr name="searchDropdownBackground" format="reference" />
-
- <!-- Specifies a drawable to use for the 'home as up' indicator. -->
- <attr name="homeAsUpIndicator" format="reference" />
</declare-styleable>
<!-- **************************************************************** -->
@@ -4413,8 +4410,8 @@
<attr name="customNavigationLayout" format="reference" />
<!-- Specifies a fixed height. -->
<attr name="height" />
- <!-- Specifies a layout to use for the "home" section of the action bar. -->
- <attr name="homeLayout" format="reference" />
+ <!-- Specifies a drawable to use for the 'home as up' indicator. -->
+ <attr name="homeAsUpIndicator" format="reference" />
<!-- Specifies a style resource to use for an embedded progress bar. -->
<attr name="progressBarStyle" />
<!-- Specifies a style resource to use for an indeterminate progress spinner. -->
diff --git a/core/res/res/values/ids.xml b/core/res/res/values/ids.xml
index 7a0fede..b7f177f 100644
--- a/core/res/res/values/ids.xml
+++ b/core/res/res/values/ids.xml
@@ -72,5 +72,4 @@
<item type="id" name="home" />
<item type="id" name="fillInIntent" />
<item type="id" name="rowTypeId" />
- <item type="id" name="up" />
</resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index e319fa0..aa33aa3 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1377,7 +1377,6 @@
<public type="attr" name="animationResolution" />
<public type="attr" name="state_accelerated" />
<public type="attr" name="baseline" />
- <public type="attr" name="homeLayout" />
<public type="attr" name="opacity" />
<public type="anim" name="animator_fade_in" />
@@ -1396,7 +1395,6 @@
<!-- Context menu ID for the "Select text..." menu item to switch to text
selection context mode in text views. -->
<public type="id" name="selectTextMode" />
- <public type="id" name="up" />
<!-- Standard content view for a {@link android.app.ListFragment}.
If you are implementing a subclass of ListFragment with your
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 457ba0c..dc67f45 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -917,7 +917,6 @@
<item name="android:subtitleTextStyle">@android:style/TextAppearance.Widget.ActionBar.Subtitle</item>
<item name="android:progressBarStyle">@android:style/Widget.ProgressBar.Horizontal</item>
<item name="android:indeterminateProgressStyle">@android:style/Widget.ProgressBar.Small</item>
- <item name="android:homeLayout">@layout/action_bar_home</item>
</style>
<style name="Widget.ActionMode">
@@ -1509,8 +1508,6 @@
<style name="Widget.Holo.ActionButton.Overflow">
<item name="android:src">@android:drawable/ic_menu_moreoverflow_holo_dark</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
- <item name="android:paddingLeft">16dip</item>
- <item name="android:paddingRight">16dip</item>
</style>
<style name="Widget.Holo.ActionButton.TextButton" parent="Widget.Holo.ButtonBar.Button">
@@ -1543,6 +1540,7 @@
<item name="android:subtitleTextStyle">@android:style/TextAppearance.Holo.Widget.ActionBar.Subtitle</item>
<item name="android:background">@null</item>
<item name="android:divider">?android:attr/dividerVertical</item>
+ <item name="android:homeAsUpIndicator">@android:drawable/ic_ab_back_holo_dark</item>
<item name="android:progressBarStyle">@android:style/Widget.Holo.ProgressBar.Horizontal</item>
<item name="android:indeterminateProgressStyle">@android:style/Widget.Holo.ProgressBar</item>
<item name="android:progressBarPadding">32dip</item>
@@ -1775,8 +1773,6 @@
<style name="Widget.Holo.Light.ActionButton.Overflow">
<item name="android:src">@android:drawable/ic_menu_moreoverflow_holo_light</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
- <item name="android:paddingLeft">16dip</item>
- <item name="android:paddingRight">16dip</item>
</style>
<style name="Widget.Holo.Light.ActionBarView_TabView" parent="Widget.ActionBarView_TabView">
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index b5dcf05..a409c24 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -706,7 +706,6 @@
<item name="groupButtonBackground">@android:drawable/group_button_background_holo_dark</item>
<item name="selectableItemBackground">@android:drawable/item_background_holo_dark</item>
- <item name="homeAsUpIndicator">@android:drawable/ic_ab_back_holo_dark</item>
<!-- List attributes -->
<item name="listPreferredItemHeight">64dip</item>
@@ -943,7 +942,6 @@
<item name="groupButtonBackground">@android:drawable/group_button_background_holo_light</item>
<item name="selectableItemBackground">@android:drawable/item_background_holo_light</item>
- <item name="homeAsUpIndicator">@android:drawable/ic_ab_back_holo_light</item>
<!-- List attributes -->
<item name="listPreferredItemHeight">64dip</item>
diff --git a/docs/html/guide/topics/resources/menu-resource.jd b/docs/html/guide/topics/resources/menu-resource.jd
index cde72bd..7bcd78a 100644
--- a/docs/html/guide/topics/resources/menu-resource.jd
+++ b/docs/html/guide/topics/resources/menu-resource.jd
@@ -36,22 +36,23 @@ In XML: <code>@[<em>package</em>:]menu.<em>filename</em></code>
&lt;?xml version="1.0" encoding="utf-8"?>
&lt;<a href="#menu-element">menu</a> xmlns:android="http://schemas.android.com/apk/res/android">
&lt;<a href="#item-element">item</a> android:id="@[+][<em>package</em>:]id/<em>resource_name</em>"
- android:menuCategory=["container" | "system" | "secondary" | "alternative"]
- android:orderInCategory="<em>integer</em>"
android:title="<em>string</em>"
android:titleCondensed="<em>string</em>"
android:icon="@[package:]drawable/<em>drawable_resource_name</em>"
+ android:showAsAction=["ifRoom" | "never" | "withText" | "always"]
android:alphabeticShortcut="<em>string</em>"
android:numericShortcut="<em>string</em>"
android:checkable=["true" | "false"]
android:visible=["visible" | "invisible" | "gone"]
- android:enabled=["enabled" | "disabled"] /&gt;
+ android:enabled=["enabled" | "disabled"]
+ android:menuCategory=["container" | "system" | "secondary" | "alternative"]
+ android:orderInCategory="<em>integer</em>" /&gt;
&lt;<a href="#group-element">group</a> android:id="@[+][<em>package</em>:]id/<em>resource name</em>"
- android:menuCategory=["container" | "system" | "secondary" | "alternative"]
- android:orderInCategory="<em>integer</em>"
android:checkableBehavior=["none" | "all" | "single"]
android:visible=["visible" | "invisible" | "gone"]
- android:enabled=["enabled" | "disabled"] &gt;
+ android:enabled=["enabled" | "disabled"]
+ android:menuCategory=["container" | "system" | "secondary" | "alternative"]
+ android:orderInCategory="<em>integer</em>" &gt;
&lt;<a href="#item-element">item</a> /&gt;
&lt;/group&gt;
&lt;<a href="#item-element">item</a> &gt;
@@ -77,91 +78,120 @@ In XML: <code>@[<em>package</em>:]menu.<em>filename</em></code>
<code>"http://schemas.android.com/apk/res/android"</code>.
</dl>
</dd>
- <dt id="group-element"><code>&lt;group&gt;</code></dt>
- <dd>A menu group (to create a collection of items that share traits, such as whether they are
-visible, enabled, or checkable). Contains one or more <code>&lt;item&gt;</code> elements. Must be a
-child of a <code>&lt;menu&gt;</code> element.
+
+ <dt id="item-element"><code>&lt;item&gt;</code></dt>
+ <dd>A menu item. May contain a <code>&lt;menu&gt;</code> element (for a Sub
+ Menu). Must be a child of a <code>&lt;menu&gt;</code> or <code>&lt;group&gt;</code> element.
<p class="caps">attributes:</p>
<dl class="atn-list">
<dt><code>android:id</code></dt>
<dd><em>Resource ID</em>. A unique resource ID. To create a new resource ID for this item, use the form:
-<code>"@+id/<em>name</em>"</code>. The plus symbol indicates that this should be created as a new ID.</dd>
+<code>"@+id/<em>name</em>"</code>. The plus symbol indicates that this should be created as a new
+ID.</dd>
+ <dt><code>android:title</code></dt>
+ <dd><em>String</em>. The menu title.</dd>
+ <dt><code>android:titleCondensed</code></dt>
+ <dd><em>String</em>. A condensed title, for situations in which the normal title is
+too long.</dd>
+ <dt><code>android:icon</code></dt>
+ <dd><em>Drawable resource</em>. An image to be used as the menu item icon.</dd>
+
+ <dt><code>android:showAsAction</code></dt>
+ <dd><em>Keyword</em>. When and how this item should appear as an action item in the Action
+Bar. A menu item can appear as an action item only when the activity includes an {@link
+android.app.ActionBar} (introduced in API Level HONEYCOMB). Valid values:
+ <table>
+ <tr><th>Value</th><th>Description</th></tr>
+ <tr><td><code>ifRoom</code></td><td>Only place this item in the Action Bar if
+there is room for it.</td></tr>
+ <tr><td><code>withText</code></td><td>Also include the title text (defined
+by {@code android:title}) with the action item. You can include this value along with one
+of the others as a flag set, by separating them with a pipe {@code |}.</td></tr>
+ <tr><td><code>never</code></td><td>Never place this item in the Action Bar.</td></tr>
+ <tr><td><code>always</code></td><td>Always place this item in the Action Bar.
+Avoid using this unless it's critical that the item always appear in the action
+bar. Setting multiple items to always appear as action items can result in them overlapping
+with other UI in the action bar.</td></tr>
+ </table>
+ <p>See <a href="{@docRoot}guide/topics/ui/actionbar.html">Using the Action Bar</a> for
+more information.</p>
+ <p>Introduced in API Level HONEYCOMB.</p>
+ </dd>
+
+ <dt><code>android:alphabeticShortcut</code></dt>
+ <dd><em>Char</em>. A character for the alphabetic shortcut key.</dd>
+ <dt><code>android:numericShortcut</code></dt>
+ <dd><em>Integer</em>. A number for the numeric shortcut key.</dd>
+ <dt><code>android:checkable</code></dt>
+ <dd><em>Boolean</em>. "true" if the item is checkable.</dd>
+ <dt><code>android:checked</code></dt>
+ <dd><em>Boolean</em>. "true" if the item is checked by default.</dd>
+ <dt><code>android:visible</code></dt>
+ <dd><em>Boolean</em>. "true" if the item is visible by default.</dd>
+ <dt><code>android:enabled</code></dt>
+ <dd><em>Boolean</em>. "true" if the item is enabled by default.</dd>
<dt><code>android:menuCategory</code></dt>
<dd><em>Keyword</em>. Value corresponding to {@link android.view.Menu} {@code CATEGORY_*}
- constants, which define the group's priority. Valid values:
+ constants, which define the item's priority. Valid values:
<table>
<tr><th>Value</th><th>Description</th></tr>
- <tr><td><code>container</code></td><td>For groups that are part of a
+ <tr><td><code>container</code></td><td>For items that are part of a
container.</td></tr>
- <tr><td><code>system</code></td><td>For groups that are provided by the
+ <tr><td><code>system</code></td><td>For items that are provided by the
system.</td></tr>
- <tr><td><code>secondary</code></td><td>For groups that are user-supplied secondary
+ <tr><td><code>secondary</code></td><td>For items that are user-supplied secondary
(infrequently used) options.</td></tr>
- <tr><td><code>alternative</code></td><td>For groups that are alternative actions
+ <tr><td><code>alternative</code></td><td>For items that are alternative actions
on the data that is currently displayed.</td></tr>
</table>
</dd>
<dt><code>android:orderInCategory</code></dt>
- <dd><em>Integer</em>. The default order of the items within the category.</dd>
+ <dd><em>Integer</em>. The order of "importance" of the item, within a group.</dd>
+ </dl>
+ </dd>
+
+ <dt id="group-element"><code>&lt;group&gt;</code></dt>
+ <dd>A menu group (to create a collection of items that share traits, such as whether they are
+visible, enabled, or checkable). Contains one or more <code>&lt;item&gt;</code> elements. Must be a
+child of a <code>&lt;menu&gt;</code> element.
+ <p class="caps">attributes:</p>
+ <dl class="atn-list">
+ <dt><code>android:id</code></dt>
+ <dd><em>Resource ID</em>. A unique resource ID. To create a new resource ID for this item,
+use the form:
+<code>"@+id/<em>name</em>"</code>. The plus symbol indicates that this should be created as a new
+ID.</dd>
<dt><code>android:checkableBehavior</code></dt>
<dd><em>Keyword</em>. The type of checkable behavior for the group. Valid values:
<table>
<tr><th>Value</th><th>Description</th></tr>
<tr><td><code>none</code></td><td>Not checkable</td></tr>
<tr><td><code>all</code></td><td>All items can be checked (use checkboxes)</td></tr>
- <tr><td><code>single</code></td><td>Only one item can be checked (use radio buttons)</td></tr>
+ <tr><td><code>single</code></td><td>Only one item can be checked (use radio
+buttons)</td></tr>
</table>
</dd>
<dt><code>android:visible</code></dt>
<dd><em>Boolean</em>. "true" if the group is visible.</dd>
<dt><code>android:enabled</code></dt>
<dd><em>Boolean</em>. "true" if the group is enabled.</dd>
- </dl>
- </dd>
- <dt id="item-element"><code>&lt;item&gt;</code></dt>
- <dd>A menu item. May contain a <code>&lt;menu&gt;</code> element (for a Sub
- Menu). Must be a child of a <code>&lt;menu&gt;</code> or <code>&lt;group&gt;</code> element.
- <p class="caps">attributes:</p>
- <dl class="atn-list">
- <dt><code>android:id</code></dt>
- <dd><em>Resource ID</em>. A unique resource ID. To create a new resource ID for this item, use the form:
-<code>"@+id/<em>name</em>"</code>. The plus symbol indicates that this should be created as a new ID.</dd>
<dt><code>android:menuCategory</code></dt>
<dd><em>Keyword</em>. Value corresponding to {@link android.view.Menu} {@code CATEGORY_*}
- constants, which define the item's priority. Valid values:
+ constants, which define the group's priority. Valid values:
<table>
<tr><th>Value</th><th>Description</th></tr>
- <tr><td><code>container</code></td><td>For items that are part of a
+ <tr><td><code>container</code></td><td>For groups that are part of a
container.</td></tr>
- <tr><td><code>system</code></td><td>For items that are provided by the
+ <tr><td><code>system</code></td><td>For groups that are provided by the
system.</td></tr>
- <tr><td><code>secondary</code></td><td>For items that are user-supplied secondary
+ <tr><td><code>secondary</code></td><td>For groups that are user-supplied secondary
(infrequently used) options.</td></tr>
- <tr><td><code>alternative</code></td><td>For items that are alternative actions
+ <tr><td><code>alternative</code></td><td>For groups that are alternative actions
on the data that is currently displayed.</td></tr>
</table>
</dd>
<dt><code>android:orderInCategory</code></dt>
- <dd><em>Integer</em>. The order of "importance" of the item, within a group.</dd>
- <dt><code>android:title</code></dt>
- <dd><em>String</em>. The menu title.</dd>
- <dt><code>android:titleCondensed</code></dt>
- <dd><em>String</em>. A condensed title, for situations in which the normal title is
-too long.</dd>
- <dt><code>android:icon</code></dt>
- <dd><em>Drawable resource</em>. An image to be used as the menu item icon.</dd>
- <dt><code>android:alphabeticShortcut</code></dt>
- <dd><em>Char</em>. A character for the alphabetic shortcut key.</dd>
- <dt><code>android:numericShortcut</code></dt>
- <dd><em>Integer</em>. A number for the numeric shortcut key.</dd>
- <dt><code>android:checkable</code></dt>
- <dd><em>Boolean</em>. "true" if the item is checkable.</dd>
- <dt><code>android:checked</code></dt>
- <dd><em>Boolean</em>. "true" if the item is checked by default.</dd>
- <dt><code>android:visible</code></dt>
- <dd><em>Boolean</em>. "true" if the item is visible by default.</dd>
- <dt><code>android:enabled</code></dt>
- <dd><em>Boolean</em>. "true" if the item is enabled by default.</dd>
+ <dd><em>Integer</em>. The default order of the items within the category.</dd>
</dl>
</dd>
</dl>
@@ -174,7 +204,8 @@ too long.</dd>
&lt;menu xmlns:android="http://schemas.android.com/apk/res/android">
&lt;item android:id="@+id/item1"
android:title="@string/item1"
- android:icon="@drawable/group_item1_icon" />
+ android:icon="@drawable/group_item1_icon"
+ android:showAsAction="ifRoom|withText"/>
&lt;group android:id="@+id/group">
&lt;item android:id="@+id/group_item1"
android:title="@string/group_item1"
@@ -184,7 +215,8 @@ too long.</dd>
android:icon="@drawable/group_item2_icon" />
&lt;/group>
&lt;item android:id="@+id/submenu"
- android:title="@string/submenu_title" >
+ android:title="@string/submenu_title"
+ android:showAsAction="ifRoom|withText" >
&lt;menu>
&lt;item android:id="@+id/submenu_item1"
android:title="@string/submenu_item1" />
@@ -201,6 +233,8 @@ public boolean onCreateOptionsMenu(Menu menu) {
return true;
}
</pre>
+<p class="note"><strong>Note:</strong> The {@code android:showAsAction} attribute is
+available only on Android X.X (API Level HONEYCOMB) and greater.</p>
</dd> <!-- end example -->