Loading core/java/com/android/internal/widget/ButtonBarLayout.java +11 −1 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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); Loading core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2315,4 +2315,6 @@ <java-symbol type="plurals" name="selected_count" /> <java-symbol type="drawable" name="ic_dialog_alert_material" /> <java-symbol type="bool" name="allow_stacked_button_bar" /> </resources> Loading
core/java/com/android/internal/widget/ButtonBarLayout.java +11 −1 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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); Loading
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2315,4 +2315,6 @@ <java-symbol type="plurals" name="selected_count" /> <java-symbol type="drawable" name="ic_dialog_alert_material" /> <java-symbol type="bool" name="allow_stacked_button_bar" /> </resources>