summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alan Viverette <alanv@google.com> 2018-01-02 16:18:48 -0500
committer Alan Viverette <alanv@google.com> 2018-01-02 16:18:48 -0500
commitf51fa7deac6f48bdcecfae76192d370d9d143e6e (patch)
treec7bac7783c72b4a5453258966898ed1c2a2af7b6
parentdc4cb146315240441fc8d9c05fe8dd63370a7c57 (diff)
Always allow button stacking
Previously did not allow stacking on small screens, which resulted in buttons clipping at the ending edge of the dialog. Change-Id: Iaa36cb657556197018b192c24c4043e6395c74a2 Fixes: 37507002 Test: manual
-rw-r--r--core/java/com/android/internal/widget/ButtonBarLayout.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/core/java/com/android/internal/widget/ButtonBarLayout.java b/core/java/com/android/internal/widget/ButtonBarLayout.java
index 82affe2f86b1..ab8be33599fa 100644
--- a/core/java/com/android/internal/widget/ButtonBarLayout.java
+++ b/core/java/com/android/internal/widget/ButtonBarLayout.java
@@ -30,9 +30,6 @@ import com.android.internal.R;
* orientation when it can't fit its child views horizontally.
*/
public class ButtonBarLayout extends LinearLayout {
- /** Minimum screen height required for button stacking. */
- private static final int ALLOW_STACKING_MIN_HEIGHT_DP = 320;
-
/** Amount of the second button to "peek" above the fold when stacked. */
private static final int PEEK_BUTTON_DP = 16;
@@ -46,12 +43,8 @@ public class ButtonBarLayout extends LinearLayout {
public ButtonBarLayout(Context context, AttributeSet attrs) {
super(context, attrs);
- final boolean allowStackingDefault =
- context.getResources().getConfiguration().screenHeightDp
- >= ALLOW_STACKING_MIN_HEIGHT_DP;
final TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.ButtonBarLayout);
- mAllowStacking = ta.getBoolean(R.styleable.ButtonBarLayout_allowStacking,
- allowStackingDefault);
+ mAllowStacking = ta.getBoolean(R.styleable.ButtonBarLayout_allowStacking, true);
ta.recycle();
}