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

Commit 837c9272 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix up QS edit UI"

parents ff8b79e1 6f770566
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -17,7 +17,8 @@
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="48dp"
    android:layout_height="wrap_content"
    android:minHeight="48dp"
    android:paddingTop="8dp">
    <LinearLayout
        android:id="@+id/label_group"
@@ -55,6 +56,21 @@
            android:visibility="gone" />
    </LinearLayout>

    <TextView
        android:id="@+id/app_label"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignStart="@id/label_group"
        android:layout_alignEnd="@id/label_group"
        android:layout_below="@id/label_group"
        android:clickable="false"
        android:maxLines="1"
        android:padding="0dp"
        android:visibility="gone"
        android:gravity="center"
        android:textAppearance="@style/TextAppearance.QS.TileLabel"
        android:textColor="?android:attr/textColorPrimary"/>

    <View
        android:id="@+id/underline"
        android:layout_width="30dp"
+1 −7
Original line number Diff line number Diff line
@@ -35,19 +35,13 @@ public class CustomizeTileView extends QSTileView {
    protected void createLabel() {
        super.createLabel();
        mLabelMinLines = mLabel.getMinLines();
        View view = LayoutInflater.from(mContext).inflate(R.layout.qs_tile_label, null);
        mAppLabel = (TextView) view.findViewById(R.id.tile_label);
        mAppLabel = findViewById(R.id.app_label);
        mAppLabel.setAlpha(.6f);
        mAppLabel.setSingleLine(true);
        addView(view);
    }

    public void setShowAppLabel(boolean showAppLabel) {
        mAppLabel.setVisibility(showAppLabel ? View.VISIBLE : View.GONE);
        mLabel.setSingleLine(showAppLabel);
        if (!showAppLabel) {
            mLabel.setMinLines(mLabelMinLines);
        }
    }

    public void setAppLabel(CharSequence label) {
+1 −0
Original line number Diff line number Diff line
@@ -165,6 +165,7 @@ public class TileQueryHelper {
        }
        TileInfo info = new TileInfo();
        info.state = state;
        info.state.dualTarget = false; // No dual targets in edit.
        info.state.expandedAccessibilityClassName =
                Button.class.getName();
        info.spec = spec;