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

Commit f805b40c authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge changes Ia2bf4d17,I8242523d

* changes:
  Fix alert dialog alignment and touch feedback masking
  Fix VectorDrawable states
parents 7085d138 dccbe8b0
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>
+20 −20
Original line number Diff line number Diff line
@@ -27,24 +27,27 @@

    <group>
        <path
            android:name="check"
            android:pathData="M 232.1,80.6 L 248.5,92.1 L 145.2,239.5 L 71.5,187.8 L 83,171.5 L 140.3,211.7 z"
            android:fill="?attr/colorControlActivated" />
            android:name="box1"
            android:pathData="M 240,80 L 240,240 L 80,240 L 80,80 L 240,80 L 240,80 z"
            android:stroke="?attr/colorControlNormal"
            android:strokeWidth="20"
            android:strokeLineCap="round"
            android:strokeLineJoin="round" />
    </group>
    <group>
        <path
            android:name="box1"
            android:pathData="M 160,216.5 L 143.5,240 L 120,223.5 L 136.5,200 L 160,216.5 L 160,216.5 z"
            android:fill="?attr/colorControlActivated"
            android:stroke="?attr/colorControlActivated"
            android:name="box2"
            android:pathData="M 160,200 L 160,240 L 120,240 L 120,200 L 160,200 L 160,200 z"
            android:stroke="?attr/colorControlNormal"
            android:strokeWidth="10"
            android:strokeLineCap="round"
            android:strokeLineJoin="round" />
    </group>
    <group>
        <path
            android:name="box2"
            android:name="box3"
            android:pathData="M 160,216.5 L 143.5,240 L 120,223.5 L 136.5,200 L 160,216.5 L 160,216.5 z"
            android:rotation="-35"
            android:rotation="35"
            android:pivotX="140"
            android:pivotY="220"
            android:fill="?attr/colorControlNormal"
@@ -55,25 +58,22 @@
    </group>
    <group>
        <path
            android:name="box3"
            android:pathData="M 160,200 L 160,240 L 120,240 L 120,200 L 160,200 L 160,200 z"
            android:stroke="?attr/colorControlNormal"
            android:strokeWidth="10"
            android:name="box4"
            android:pathData="M 160,216.5 L 143.5,240 L 120,223.5 L 136.5,200 L 160,216.5 L 160,216.5 z"
            android:fill="?attr/colorControlActivated"
            android:stroke="?attr/colorControlActivated"
            android:strokeLineCap="round"
            android:strokeLineJoin="round" />
    </group>
    <group>
        <path
            android:name="box4"
            android:pathData="M 240,80 L 240,240 L 80,240 L 80,80 L 240,80 L 240,80 z"
            android:stroke="?attr/colorControlNormal"
            android:strokeWidth="20"
            android:strokeLineCap="round"
            android:strokeLineJoin="round" />
            android:name="check"
            android:pathData="M 232.1,80.6 L 248.5,92.1 L 145.2,239.5 L 71.5,187.8 L 83,171.5 L 140.3,211.7 z"
            android:fill="?attr/colorControlActivated" />
    </group>

    <animation
        android:durations="300,100,0,300"
        android:sequence="check,box1,box2,box3,box4" />
        android:sequence="box1,box2,box3,box4,check" />

</vector>
+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);
        }

Loading