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

This commit is contained in:
Jason Monk
2017-04-12 16:59:56 +00:00
committed by Android (Google) Code Review
4 changed files with 21 additions and 14 deletions

View File

@@ -14,8 +14,8 @@ Copyright (C) 2014 The Android Open Source Project
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24.0dp"
android:height="24.0dp"
android:width="18.0dp"
android:height="18.0dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">

View File

@@ -21,7 +21,7 @@
android:clipChildren="false"
android:clipToPadding="false"
android:minHeight="48dp"
android:paddingTop="8dp">
android:paddingTop="12dp">
<LinearLayout
android:id="@+id/label_group"
android:layout_width="wrap_content"
@@ -31,6 +31,10 @@
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="horizontal">
<Space
android:id="@+id/expand_space"
android:layout_width="22dp"
android:layout_height="0dp" />
<TextView
android:id="@+id/tile_label"
@@ -44,14 +48,6 @@
android:textAppearance="@style/TextAppearance.QS.TileLabel"
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"
android:layout_width="@dimen/qs_tile_text_size"
android:layout_height="match_parent"
@@ -60,6 +56,14 @@
android:layout_marginLeft="@dimen/restricted_padlock_pading"
android:scaleType="centerInside"
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>
<TextView
@@ -85,6 +89,7 @@
android:layout_alignStart="@id/label_group"
android:layout_alignEnd="@id/label_group"
android:layout_below="@id/label_group"
android:visibility="gone"
android:alpha="?android:attr/disabledAlpha"
android:background="?android:attr/colorForeground"/>

View File

@@ -218,8 +218,8 @@
<!-- The size of the gesture span needed to activate the "pull" notification expansion -->
<dimen name="pull_span_min">25dp</dimen>
<dimen name="qs_tile_height">88dp</dimen>
<dimen name="qs_tile_margin">28dp</dimen>
<dimen name="qs_tile_height">106dp</dimen>
<dimen name="qs_tile_margin">19dp</dimen>
<dimen name="qs_tile_margin_top">16dp</dimen>
<dimen name="qs_quick_tile_size">48dp</dimen>
<dimen name="qs_quick_tile_padding">12dp</dimen>

View File

@@ -42,6 +42,7 @@ public class QSTileView extends QSTileBaseView {
private int mState;
private ViewGroup mLabelContainer;
private View mExpandIndicator;
private View mExpandSpace;
public QSTileView(Context context, QSIconView icon) {
this(context, icon, false);
@@ -84,6 +85,7 @@ public class QSTileView extends QSTileBaseView {
mPadLock = mLabelContainer.findViewById(R.id.restricted_padlock);
mDivider = mLabelContainer.findViewById(R.id.underline);
mExpandIndicator = mLabelContainer.findViewById(R.id.expand_indicator);
mExpandSpace = mLabelContainer.findViewById(R.id.expand_space);
addView(mLabelContainer);
}
@@ -101,8 +103,8 @@ public class QSTileView extends QSTileBaseView {
mState = state.state;
mLabel.setText(state.label);
}
mDivider.setVisibility(state.dualTarget ? View.VISIBLE : View.INVISIBLE);
mExpandIndicator.setVisibility(state.dualTarget ? View.VISIBLE : View.GONE);
mExpandSpace.setVisibility(state.dualTarget ? View.VISIBLE : View.GONE);
mLabelContainer.setContentDescription(state.dualTarget ? state.dualLabelContentDescription
: null);
if (state.dualTarget != mLabelContainer.isClickable()) {