diff --git a/api/current.xml b/api/current.xml
index 9ad6a86267d8e..f02ec65baa3cb 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -1949,7 +1949,7 @@
type="int"
transient="false"
volatile="false"
- value="16843555"
+ value="16843553"
static="true"
final="true"
deprecated="not deprecated"
@@ -1960,7 +1960,7 @@
type="int"
transient="false"
volatile="false"
- value="16843554"
+ value="16843552"
static="true"
final="true"
deprecated="not deprecated"
@@ -1971,7 +1971,7 @@
type="int"
transient="false"
volatile="false"
- value="16843556"
+ value="16843554"
static="true"
final="true"
deprecated="not deprecated"
@@ -2088,17 +2088,6 @@
visibility="public"
>
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/core/java/android/app/ActionBar.java b/core/java/android/app/ActionBar.java
index 2f695202d5f31..67eb02df26d5a 100644
--- a/core/java/android/app/ActionBar.java
+++ b/core/java/android/app/ActionBar.java
@@ -16,7 +16,6 @@
package android.app;
-import android.app.ActionBar.Tab;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
@@ -39,7 +38,7 @@ public abstract class ActionBar {
/**
* Standard navigation mode. Consists of either a logo or icon
* and title text with an optional subtitle. Clicking any of these elements
- * will dispatch onActionItemSelected to the registered Callback with
+ * will dispatch onOptionsItemSelected to the host Activity with
* a MenuItem with item ID android.R.id.home.
*/
public static final int NAVIGATION_MODE_STANDARD = 0;
diff --git a/core/java/android/widget/ButtonGroup.java b/core/java/android/widget/ButtonGroup.java
deleted file mode 100644
index 7548ef617749b..0000000000000
--- a/core/java/android/widget/ButtonGroup.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * 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.
- */
-
-package android.widget;
-
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.graphics.Canvas;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewGroup;
-
-/**
- * @hide
- */
-public class ButtonGroup extends LinearLayout {
- private static final String LOG = "ButtonGroup";
-
- private Drawable mDivider;
- private int mDividerWidth;
- private int mDividerHeight;
- private int mButtonBackgroundRes;
- private int mShowDividers;
-
- /**
- * Don't show any dividers.
- */
- public static final int SHOW_DIVIDER_NONE = 0;
- /**
- * Show a divider at the beginning of the group.
- */
- public static final int SHOW_DIVIDER_BEGINNING = 1;
- /**
- * Show dividers between each item in the group.
- */
- public static final int SHOW_DIVIDER_MIDDLE = 2;
- /**
- * Show a divider at the end of the group.
- */
- public static final int SHOW_DIVIDER_END = 4;
-
- private final Rect mTempRect = new Rect();
-
- public ButtonGroup(Context context) {
- this(context, null);
- }
-
- public ButtonGroup(Context context, AttributeSet attrs) {
- this(context, attrs, com.android.internal.R.attr.buttonGroupStyle);
- }
-
- public ButtonGroup(Context context, AttributeSet attrs, int defStyleRes) {
- super(context, attrs, defStyleRes);
-
- TypedArray a = context.obtainStyledAttributes(attrs,
- com.android.internal.R.styleable.ButtonGroup, defStyleRes, 0);
-
- setDividerDrawable(a.getDrawable(com.android.internal.R.styleable.ButtonGroup_divider));
- mButtonBackgroundRes = a.getResourceId(
- com.android.internal.R.styleable.ButtonGroup_buttonBackground, 0);
- setShowDividers(a.getInt(com.android.internal.R.styleable.ButtonGroup_showDividers,
- SHOW_DIVIDER_MIDDLE));
- a.recycle();
- }
-
- /**
- * Set how dividers should be shown between items in this button group.
- *
- * @param showDividers One or more of {@link #SHOW_DIVIDER_BEGINNING},
- * {@link #SHOW_DIVIDER_MIDDLE}, or {@link #SHOW_DIVIDER_END},
- * or {@link #SHOW_DIVIDER_NONE} to show no dividers.
- */
- public void setShowDividers(int showDividers) {
- if (showDividers != mShowDividers) {
- requestLayout();
- }
- mShowDividers = showDividers;
- }
-
- /**
- * @return A flag set indicating how dividers should be shown around items.
- * @see #setShowDividers(int)
- */
- public int getShowDividers() {
- return mShowDividers;
- }
-
- /**
- * Set a drawable to be used as a divider between items.
- * @param divider Drawable that will divide each item.
- */
- public void setDividerDrawable(Drawable divider) {
- if (divider == mDivider) {
- return;
- }
- mDivider = divider;
- if (divider != null) {
- mDividerWidth = divider.getIntrinsicWidth();
- mDividerHeight = divider.getIntrinsicHeight();
- } else {
- mDividerWidth = 0;
- mDividerHeight = 0;
- }
- requestLayout();
- }
-
- /**
- * Retrieve the drawable used to draw dividers between items.
- * @return The divider drawable
- */
- public Drawable getDividerDrawable() {
- return mDivider;
- }
-
- @Override
- public void addView(View child, int index, ViewGroup.LayoutParams params) {
- if (child instanceof Button && mButtonBackgroundRes != 0) {
- // Preserve original padding as we change the background
- final int paddingLeft = child.getPaddingLeft();
- final int paddingRight = child.getPaddingRight();
- final int paddingTop = child.getPaddingTop();
- final int paddingBottom = child.getPaddingBottom();
- child.setBackgroundResource(mButtonBackgroundRes);
- child.setPadding(paddingLeft, paddingTop, paddingRight, paddingBottom);
- }
-
- super.addView(child, index, params);
- }
-
- @Override
- public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
-
- // Add the extra size that dividers contribute.
- int dividerCount = 0;
- if ((mShowDividers & SHOW_DIVIDER_MIDDLE) == SHOW_DIVIDER_MIDDLE) {
- final int childCount = getChildCount();
- for (int i = 0; i < childCount; i++) {
- if (getChildAt(i).getVisibility() != GONE) {
- dividerCount++;
- }
- }
- dividerCount = Math.max(0, dividerCount);
- }
- if ((mShowDividers & SHOW_DIVIDER_BEGINNING) == SHOW_DIVIDER_BEGINNING) {
- dividerCount++;
- }
- if ((mShowDividers & SHOW_DIVIDER_END) == SHOW_DIVIDER_END) {
- dividerCount++;
- }
-
- if (getOrientation() == VERTICAL) {
- final int dividerSize = mDividerHeight * dividerCount;
- setMeasuredDimension(getMeasuredWidthAndState(),
- resolveSizeAndState(getMeasuredHeight() + dividerSize, heightMeasureSpec,
- getMeasuredHeightAndState()));
- } else {
- final int dividerSize = mDividerWidth * dividerCount;
- setMeasuredDimension(resolveSizeAndState(getMeasuredWidth() + dividerSize,
- widthMeasureSpec, getMeasuredWidthAndState()),
- getMeasuredHeightAndState());
- }
- }
-
- @Override
- public void onLayout(boolean changed, int l, int t, int r, int b) {
- super.onLayout(changed, l, t, r, b);
-
- final boolean begin = (mShowDividers & SHOW_DIVIDER_BEGINNING) == SHOW_DIVIDER_BEGINNING;
- final boolean middle = (mShowDividers & SHOW_DIVIDER_MIDDLE) == SHOW_DIVIDER_MIDDLE;
-
- // Offset children to leave space for dividers.
- if (getOrientation() == VERTICAL) {
- int offset = begin ? mDividerHeight : 0;
- final int childCount = getChildCount();
- for (int i = 0; i < childCount; i++) {
- View child = getChildAt(i);
- child.offsetTopAndBottom(offset);
- if (middle && child.getVisibility() != GONE) {
- offset += mDividerHeight;
- }
- }
- } else {
- int offset = begin ? mDividerWidth : 0;
- final int childCount = getChildCount();
- for (int i = 0; i < childCount; i++) {
- View child = getChildAt(i);
- child.offsetLeftAndRight(offset);
- if (middle && child.getVisibility() != GONE) {
- offset += mDividerWidth;
- }
- }
- }
- }
-
- @Override
- public void dispatchDraw(Canvas canvas) {
- if (mDivider == null) {
- super.dispatchDraw(canvas);
- return;
- }
-
- final boolean begin = (mShowDividers & SHOW_DIVIDER_BEGINNING) == SHOW_DIVIDER_BEGINNING;
- final boolean middle = (mShowDividers & SHOW_DIVIDER_MIDDLE) == SHOW_DIVIDER_MIDDLE;
- final boolean end = (mShowDividers & SHOW_DIVIDER_END) == SHOW_DIVIDER_END;
- final boolean vertical = getOrientation() == VERTICAL;
-
- final Rect bounds = mTempRect;
- bounds.left = mPaddingLeft;
- bounds.right = mRight - mLeft - mPaddingRight;
- bounds.top = mPaddingTop;
- bounds.bottom = mBottom - mTop - mPaddingBottom;
-
- if (begin) {
- if (vertical) {
- bounds.bottom = bounds.top + mDividerHeight;
- } else {
- bounds.right = bounds.left + mDividerWidth;
- }
- mDivider.setBounds(bounds);
- mDivider.draw(canvas);
- }
-
- final int childCount = getChildCount();
- int i = 0;
- while (i < childCount) {
- final View child = getChildAt(i);
- i++;
- if ((middle && i < childCount && child.getVisibility() != GONE) || end) {
- if (vertical) {
- bounds.top = child.getBottom();
- bounds.bottom = bounds.top + mDividerHeight;
- } else {
- bounds.left = child.getRight();
- bounds.right = bounds.left + mDividerWidth;
- }
- mDivider.setBounds(bounds);
- mDivider.draw(canvas);
- }
- }
-
- super.dispatchDraw(canvas);
- }
-}
diff --git a/core/java/com/android/internal/view/menu/ActionMenuView.java b/core/java/com/android/internal/view/menu/ActionMenuView.java
index 84067d004f230..871973d94b1f9 100644
--- a/core/java/com/android/internal/view/menu/ActionMenuView.java
+++ b/core/java/com/android/internal/view/menu/ActionMenuView.java
@@ -95,8 +95,7 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo
TypedArray a = context.obtainStyledAttributes(com.android.internal.R.styleable.Theme);
final int buttonStyle = a.getResourceId(
com.android.internal.R.styleable.Theme_actionButtonStyle, 0);
- final int groupStyle = a.getResourceId(
- com.android.internal.R.styleable.Theme_buttonGroupStyle, 0);
+ mDivider = a.getDrawable(com.android.internal.R.styleable.Theme_dividerVertical);
a.recycle();
a = context.obtainStyledAttributes(buttonStyle, com.android.internal.R.styleable.View);
@@ -104,11 +103,6 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo
mButtonPaddingRight = a.getDimension(com.android.internal.R.styleable.View_paddingRight, 0);
a.recycle();
- a = context.obtainStyledAttributes(groupStyle,
- com.android.internal.R.styleable.ButtonGroup);
- mDivider = a.getDrawable(com.android.internal.R.styleable.ButtonGroup_divider);
- a.recycle();
-
mDividerPadding = DIVIDER_PADDING * res.getDisplayMetrics().density;
setBaselineAligned(false);
diff --git a/core/res/res/layout-xlarge/alert_dialog.xml b/core/res/res/layout-xlarge/alert_dialog.xml
index 291e1c2182214..9444206f9b033 100644
--- a/core/res/res/layout-xlarge/alert_dialog.xml
+++ b/core/res/res/layout-xlarge/alert_dialog.xml
@@ -105,8 +105,8 @@
android:layout_height="wrap_content"
android:minHeight="54dip"
android:orientation="vertical" >
-
-
+
diff --git a/core/res/res/layout-xlarge/alert_dialog_holo.xml b/core/res/res/layout-xlarge/alert_dialog_holo.xml
index 6790a81ad1190..fca7c78fc2c2d 100644
--- a/core/res/res/layout-xlarge/alert_dialog_holo.xml
+++ b/core/res/res/layout-xlarge/alert_dialog_holo.xml
@@ -110,7 +110,7 @@
android:showDividers="beginning"
android:dividerPadding="16dip">
-
-
+
diff --git a/core/res/res/layout/alert_dialog_holo.xml b/core/res/res/layout/alert_dialog_holo.xml
index 9579bcb76bf9b..ea6e11eb5203f 100644
--- a/core/res/res/layout/alert_dialog_holo.xml
+++ b/core/res/res/layout/alert_dialog_holo.xml
@@ -110,7 +110,7 @@
android:showDividers="beginning"
android:dividerPadding="16dip">
-
-
+
+
-
-
+
+
+
+
+
@@ -4569,15 +4573,6 @@
-
-
-
-
-
-
-
-
-
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 5941b527545c8..ae029e5f476d1 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1360,8 +1360,6 @@
-
-
@@ -1397,6 +1395,9 @@
+
+
+
@@ -1560,6 +1561,12 @@
+
+
+
+
+
+
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index d677aa504a0f9..58553e1f18568 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -937,6 +937,14 @@
- @android:drawable/bottom_bar
+
+
+
-
-
@@ -1298,6 +1301,9 @@
+
+
+
-
-
+
+
@@ -1698,14 +1709,18 @@
- 24dip
-
-
+
+
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 60598f0b64c73..0f21e9f5a150e 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -90,7 +90,6 @@
- @android:style/Widget.Button.Toggle
- - @null
- @android:drawable/item_background
- ?android:attr/buttonStyle
- @android:drawable/ic_ab_back_holo_dark
@@ -145,7 +144,6 @@
- @android:style/AlertDialog
- @android:style/Theme.Dialog
- @android:style/Theme.Dialog.Alert
- - ?android:attr/buttonGroupStyle
- true
@@ -261,7 +259,9 @@
- @drawable/divider_vertical_dark
- @drawable/divider_vertical_dark
- - @android:style/Widget.ButtonGroup
+ - @android:style/ButtonBar
+ - ?android:attr/buttonStyle
+ - @android:style/SegmentedButton
- @android:drawable/spinner_dropdown_background
@@ -739,7 +739,6 @@
- @android:style/Widget.Holo.Button.Toggle
- @android:style/Widget.Holo.CompoundButton.Switch
- - @android:drawable/group_button_background_holo_dark
- @android:drawable/item_background_holo_dark
- @android:style/Widget.Holo.Button.Borderless
- @android:drawable/ic_ab_back_holo_dark
@@ -793,7 +792,6 @@
- @android:style/AlertDialog.Holo
- @android:style/Theme.Holo.Dialog
- @android:style/Theme.Holo.Dialog.Alert
- - @android:style/Widget.Holo.ButtonGroup.AlertDialog
- false
@@ -904,7 +902,9 @@
- ?android:attr/listDivider
- ?android:attr/listDivider
- - @android:style/Widget.Holo.ButtonGroup
+ - @android:style/Holo.ButtonBar
+ - ?android:attr/borderlessButtonStyle
+ - @android:style/Holo.SegmentedButton
- @android:drawable/search_dropdown_dark
@@ -988,7 +988,6 @@
- @android:style/Widget.Holo.Light.Button.Toggle
- - @android:drawable/group_button_background_holo_light
- @android:drawable/item_background_holo_light
- @android:style/Widget.Holo.Light.Button.Borderless
- @android:drawable/ic_ab_back_holo_light
@@ -1042,7 +1041,6 @@
- @android:style/AlertDialog.Holo.Light
- @android:style/Theme.Holo.Light.Dialog
- @android:style/Theme.Holo.Light.Dialog.Alert
- - @android:style/Widget.Holo.Light.ButtonGroup.AlertDialog
- @android:drawable/menu_background
@@ -1152,7 +1150,9 @@
- ?android:attr/listDivider
- ?android:attr/listDivider
- - @android:style/Widget.Holo.Light.ButtonGroup
+ - @android:style/Holo.Light.ButtonBar
+ - ?android:attr/borderlessButtonStyle
+ - @android:style/Holo.Light.SegmentedButton
- @android:drawable/search_dropdown_light
@@ -1216,8 +1216,7 @@
- @null
- - @android:style/Widget.Holo.ButtonGroup.AlertDialog
- - ?android:attr/selectableItemBackground
+ - @android:style/Holo.ButtonBar.AlertDialog
- @android:style/TextAppearance.Holo
- @android:style/TextAppearance.Holo.Inverse
@@ -1287,8 +1286,7 @@
- @null
- - @android:style/Widget.Holo.Light.ButtonGroup.AlertDialog
- - ?android:attr/selectableItemBackground
+ - @android:style/Holo.Light.ButtonBar.AlertDialog
- @android:style/TextAppearance.Holo.Light
- @android:style/TextAppearance.Holo.Light.Inverse