Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dccbe8b0 authored by Alan Viverette's avatar Alan Viverette
Browse files

Fix alert dialog alignment and touch feedback masking

BUG: 13905057
Change-Id: Ia2bf4d170370c83f4ea863ecae24fffecc6fc020
parent 70802d25
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

<touch-feedback xmlns:android="http://schemas.android.com/apk/res/android"
    android:tint="?attr/colorButtonPressed">
    <item android:drawable="@color/transparent" />
    <item android:id="@id/mask"
        android:drawable="@drawable/btn_qntm_alpha" />
</touch-feedback>
+13 −13
Original line number Diff line number Diff line
@@ -91,32 +91,32 @@
            style="?android:attr/buttonBarStyle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layoutDirection="locale"
            android:measureWithLargestChild="true">
            android:layoutDirection="locale">
            <Button android:id="@+id/button3"
                style="?android:attr/buttonBarButtonStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="start"
                android:layout_marginRight="8dip"
                android:maxLines="2"
                android:minHeight="@dimen/alert_dialog_button_bar_height"
                style="?android:attr/buttonBarButtonStyle" />
                android:minHeight="@dimen/alert_dialog_button_bar_height" />
            <View
                android:layout_width="0dp"
                android:layout_height="@dimen/alert_dialog_button_bar_height"
                android:layout_weight="1"
                android:visibility="invisible" />
            <Button android:id="@+id/button2"
                style="?android:attr/buttonBarButtonStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end"
                android:layout_marginRight="8dip"
                android:maxLines="2"
                android:minHeight="@dimen/alert_dialog_button_bar_height"
                style="?android:attr/buttonBarButtonStyle" />
                android:minHeight="@dimen/alert_dialog_button_bar_height" />
            <Button android:id="@+id/button1"
                style="?android:attr/buttonBarButtonStyle"
                android:layout_marginLeft="8dip"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end"
                android:maxLines="2"
                android:minHeight="@dimen/alert_dialog_button_bar_height"
                style="?android:attr/buttonBarButtonStyle" />
                android:minHeight="@dimen/alert_dialog_button_bar_height" />
        </LinearLayout>
     </LinearLayout>
</LinearLayout>
+2 −2
Original line number Diff line number Diff line
@@ -317,7 +317,7 @@ please see themes_device_defaults.xml.
        <item name="dividerVertical">?attr/listDivider</item>
        <item name="dividerHorizontal">?attr/listDivider</item>
        <item name="buttonBarStyle">@style/Widget.Quantum.ButtonBar</item>
        <item name="buttonBarButtonStyle">?attr/borderlessButtonStyle</item>
        <item name="buttonBarButtonStyle">@style/Widget.Quantum.Button.Borderless.Small</item>
        <item name="segmentedButtonStyle">@style/Widget.Quantum.SegmentedButton</item>

        <!-- SearchView attributes -->
@@ -662,7 +662,7 @@ please see themes_device_defaults.xml.
        <item name="dividerVertical">?attr/listDivider</item>
        <item name="dividerHorizontal">?attr/listDivider</item>
        <item name="buttonBarStyle">@style/Widget.Quantum.Light.ButtonBar</item>
        <item name="buttonBarButtonStyle">?attr/borderlessButtonStyle</item>
        <item name="buttonBarButtonStyle">@style/Widget.Quantum.Light.Button.Borderless.Small</item>
        <item name="segmentedButtonStyle">@style/Widget.Quantum.Light.SegmentedButton</item>

        <!-- SearchView attributes -->
+3 −1
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@ import java.io.IOException;
 * Documentation pending.
 */
public class TouchFeedbackDrawable extends LayerDrawable {
    private static final PorterDuffXfermode DST_IN = new PorterDuffXfermode(Mode.DST_IN);

    /** The maximum number of ripples supported. */
    private static final int MAX_RIPPLES = 10;

@@ -397,7 +399,7 @@ public class TouchFeedbackDrawable extends LayerDrawable {
        if (mask != null && drewRipples) {
            // TODO: This will also mask the lower layer, which is bad.
            canvas.saveLayer(bounds.left, bounds.top, bounds.right,
                    bounds.bottom, getMaskingPaint(mState.mTintXfermode), 0);
                    bounds.bottom, getMaskingPaint(DST_IN), 0);
            mask.draw(canvas);
        }