diff --git a/core/java/com/android/internal/widget/ButtonBarLayout.java b/core/java/com/android/internal/widget/ButtonBarLayout.java
index 39613e852d38c..3b7bce47e5ab8 100644
--- a/core/java/com/android/internal/widget/ButtonBarLayout.java
+++ b/core/java/com/android/internal/widget/ButtonBarLayout.java
@@ -31,7 +31,7 @@ import com.android.internal.R;
*/
public class ButtonBarLayout extends LinearLayout {
/** Whether the current configuration allows stacking. */
- private final boolean mAllowStacking;
+ private boolean mAllowStacking;
private int mLastWidthSize = -1;
@@ -43,6 +43,16 @@ public class ButtonBarLayout extends LinearLayout {
ta.recycle();
}
+ public void setAllowStacking(boolean allowStacking) {
+ if (mAllowStacking != allowStacking) {
+ mAllowStacking = allowStacking;
+ if (!mAllowStacking && getOrientation() == LinearLayout.VERTICAL) {
+ setStacked(false);
+ }
+ requestLayout();
+ }
+ }
+
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
final int widthSize = MeasureSpec.getSize(widthMeasureSpec);
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index e6f54eecd8668..483f83018f668 100755
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2315,4 +2315,6 @@
+
+