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

Commit ec9afcd4 authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Visual changes to dual target tiles" into oc-dev

parents a968d33e 209e03e2
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -14,8 +14,8 @@ Copyright (C) 2014 The Android Open Source Project
    limitations under the License.
    limitations under the License.
-->
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24.0dp"
        android:width="18.0dp"
        android:height="24.0dp"
        android:height="18.0dp"
        android:viewportWidth="48.0"
        android:viewportWidth="48.0"
        android:viewportHeight="48.0">
        android:viewportHeight="48.0">


+14 −9
Original line number Original line Diff line number Diff line
@@ -21,7 +21,7 @@
    android:clipChildren="false"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:clipToPadding="false"
    android:minHeight="48dp"
    android:minHeight="48dp"
    android:paddingTop="8dp">
    android:paddingTop="12dp">
    <LinearLayout
    <LinearLayout
        android:id="@+id/label_group"
        android:id="@+id/label_group"
        android:layout_width="wrap_content"
        android:layout_width="wrap_content"
@@ -31,6 +31,10 @@
        android:clipChildren="false"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:clipToPadding="false"
        android:orientation="horizontal">
        android:orientation="horizontal">
        <Space
            android:id="@+id/expand_space"
            android:layout_width="22dp"
            android:layout_height="0dp" />


        <TextView
        <TextView
            android:id="@+id/tile_label"
            android:id="@+id/tile_label"
@@ -44,14 +48,6 @@
            android:textAppearance="@style/TextAppearance.QS.TileLabel"
            android:textAppearance="@style/TextAppearance.QS.TileLabel"
            android:textColor="?android:attr/textColorPrimary"/>
            android:textColor="?android:attr/textColorPrimary"/>


        <ImageView
            android:id="@+id/expand_indicator"
            android:layout_marginStart="4dp"
            android:layout_width="12dp"
            android:layout_height="match_parent"
            android:src="@drawable/qs_dual_tile_caret"
            android:tint="?android:attr/textColorPrimary" />

        <ImageView android:id="@+id/restricted_padlock"
        <ImageView android:id="@+id/restricted_padlock"
            android:layout_width="@dimen/qs_tile_text_size"
            android:layout_width="@dimen/qs_tile_text_size"
            android:layout_height="match_parent"
            android:layout_height="match_parent"
@@ -60,6 +56,14 @@
            android:layout_marginLeft="@dimen/restricted_padlock_pading"
            android:layout_marginLeft="@dimen/restricted_padlock_pading"
            android:scaleType="centerInside"
            android:scaleType="centerInside"
            android:visibility="gone" />
            android:visibility="gone" />

        <ImageView
            android:id="@+id/expand_indicator"
            android:layout_marginStart="4dp"
            android:layout_width="18dp"
            android:layout_height="match_parent"
            android:src="@drawable/qs_dual_tile_caret"
            android:tint="?android:attr/textColorPrimary" />
    </LinearLayout>
    </LinearLayout>


    <TextView
    <TextView
@@ -85,6 +89,7 @@
        android:layout_alignStart="@id/label_group"
        android:layout_alignStart="@id/label_group"
        android:layout_alignEnd="@id/label_group"
        android:layout_alignEnd="@id/label_group"
        android:layout_below="@id/label_group"
        android:layout_below="@id/label_group"
        android:visibility="gone"
        android:alpha="?android:attr/disabledAlpha"
        android:alpha="?android:attr/disabledAlpha"
        android:background="?android:attr/colorForeground"/>
        android:background="?android:attr/colorForeground"/>


+2 −2
Original line number Original line Diff line number Diff line
@@ -218,8 +218,8 @@
    <!-- The size of the gesture span needed to activate the "pull" notification expansion -->
    <!-- The size of the gesture span needed to activate the "pull" notification expansion -->
    <dimen name="pull_span_min">25dp</dimen>
    <dimen name="pull_span_min">25dp</dimen>


    <dimen name="qs_tile_height">88dp</dimen>
    <dimen name="qs_tile_height">106dp</dimen>
    <dimen name="qs_tile_margin">28dp</dimen>
    <dimen name="qs_tile_margin">19dp</dimen>
    <dimen name="qs_tile_margin_top">16dp</dimen>
    <dimen name="qs_tile_margin_top">16dp</dimen>
    <dimen name="qs_quick_tile_size">48dp</dimen>
    <dimen name="qs_quick_tile_size">48dp</dimen>
    <dimen name="qs_quick_tile_padding">12dp</dimen>
    <dimen name="qs_quick_tile_padding">12dp</dimen>
+3 −1
Original line number Original line Diff line number Diff line
@@ -42,6 +42,7 @@ public class QSTileView extends QSTileBaseView {
    private int mState;
    private int mState;
    private ViewGroup mLabelContainer;
    private ViewGroup mLabelContainer;
    private View mExpandIndicator;
    private View mExpandIndicator;
    private View mExpandSpace;


    public QSTileView(Context context, QSIconView icon) {
    public QSTileView(Context context, QSIconView icon) {
        this(context, icon, false);
        this(context, icon, false);
@@ -84,6 +85,7 @@ public class QSTileView extends QSTileBaseView {
        mPadLock = mLabelContainer.findViewById(R.id.restricted_padlock);
        mPadLock = mLabelContainer.findViewById(R.id.restricted_padlock);
        mDivider = mLabelContainer.findViewById(R.id.underline);
        mDivider = mLabelContainer.findViewById(R.id.underline);
        mExpandIndicator = mLabelContainer.findViewById(R.id.expand_indicator);
        mExpandIndicator = mLabelContainer.findViewById(R.id.expand_indicator);
        mExpandSpace = mLabelContainer.findViewById(R.id.expand_space);


        addView(mLabelContainer);
        addView(mLabelContainer);
    }
    }
@@ -101,8 +103,8 @@ public class QSTileView extends QSTileBaseView {
            mState = state.state;
            mState = state.state;
            mLabel.setText(state.label);
            mLabel.setText(state.label);
        }
        }
        mDivider.setVisibility(state.dualTarget ? View.VISIBLE : View.INVISIBLE);
        mExpandIndicator.setVisibility(state.dualTarget ? View.VISIBLE : View.GONE);
        mExpandIndicator.setVisibility(state.dualTarget ? View.VISIBLE : View.GONE);
        mExpandSpace.setVisibility(state.dualTarget ? View.VISIBLE : View.GONE);
        mLabelContainer.setContentDescription(state.dualTarget ? state.dualLabelContentDescription
        mLabelContainer.setContentDescription(state.dualTarget ? state.dualLabelContentDescription
                : null);
                : null);
        if (state.dualTarget != mLabelContainer.isClickable()) {
        if (state.dualTarget != mLabelContainer.isClickable()) {