am e37cf3b8: Merge "QS: Handle font-size changes immediately in ZenModePanel." into mnc-dev
* commit 'e37cf3b8d614019c5570f945110bfbc5a8b09713': QS: Handle font-size changes immediately in ZenModePanel.
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
-->
|
-->
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/qs_detail_item_height"
|
android:layout_height="wrap_content"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:layout_marginBottom="@dimen/zen_mode_condition_detail_item_spacing"
|
android:layout_marginBottom="@dimen/zen_mode_condition_detail_item_spacing"
|
||||||
android:layout_marginStart="1dp"
|
android:layout_marginStart="1dp"
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_marginStart="7dp"
|
android:layout_marginStart="7dp"
|
||||||
android:layout_marginEnd="4dp"
|
android:layout_marginEnd="4dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="48dp"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:gravity="center" />
|
android:gravity="center" />
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public class SegmentedButtons extends LinearLayout {
|
|||||||
|
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private final LayoutInflater mInflater;
|
private final LayoutInflater mInflater;
|
||||||
|
private final SpTexts mSpTexts;
|
||||||
|
|
||||||
private Callback mCallback;
|
private Callback mCallback;
|
||||||
private Object mSelectedValue;
|
private Object mSelectedValue;
|
||||||
@@ -45,6 +46,7 @@ public class SegmentedButtons extends LinearLayout {
|
|||||||
mContext = context;
|
mContext = context;
|
||||||
mInflater = LayoutInflater.from(mContext);
|
mInflater = LayoutInflater.from(mContext);
|
||||||
setOrientation(HORIZONTAL);
|
setOrientation(HORIZONTAL);
|
||||||
|
mSpTexts = new SpTexts(mContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCallback(Callback callback) {
|
public void setCallback(Callback callback) {
|
||||||
@@ -87,6 +89,7 @@ public class SegmentedButtons extends LinearLayout {
|
|||||||
fireInteraction();
|
fireInteraction();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
mSpTexts.add(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateLocale() {
|
public void updateLocale() {
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ public class ZenModePanel extends LinearLayout {
|
|||||||
private final IconPulser mIconPulser;
|
private final IconPulser mIconPulser;
|
||||||
private final TransitionHelper mTransitionHelper = new TransitionHelper();
|
private final TransitionHelper mTransitionHelper = new TransitionHelper();
|
||||||
private final Uri mForeverId;
|
private final Uri mForeverId;
|
||||||
|
private final SpTexts mSpTexts;
|
||||||
|
|
||||||
private String mTag = TAG + "/" + Integer.toHexString(System.identityHashCode(this));
|
private String mTag = TAG + "/" + Integer.toHexString(System.identityHashCode(this));
|
||||||
|
|
||||||
@@ -96,7 +97,7 @@ public class ZenModePanel extends LinearLayout {
|
|||||||
private View mZenIntroduction;
|
private View mZenIntroduction;
|
||||||
private TextView mZenIntroductionMessage;
|
private TextView mZenIntroductionMessage;
|
||||||
private View mZenIntroductionConfirm;
|
private View mZenIntroductionConfirm;
|
||||||
private View mZenIntroductionCustomize;
|
private TextView mZenIntroductionCustomize;
|
||||||
private LinearLayout mZenConditions;
|
private LinearLayout mZenConditions;
|
||||||
private TextView mZenAlarmWarning;
|
private TextView mZenAlarmWarning;
|
||||||
|
|
||||||
@@ -125,6 +126,7 @@ public class ZenModePanel extends LinearLayout {
|
|||||||
mInflater = LayoutInflater.from(mContext.getApplicationContext());
|
mInflater = LayoutInflater.from(mContext.getApplicationContext());
|
||||||
mIconPulser = new IconPulser(mContext);
|
mIconPulser = new IconPulser(mContext);
|
||||||
mForeverId = Condition.newId(mContext).appendPath("forever").build();
|
mForeverId = Condition.newId(mContext).appendPath("forever").build();
|
||||||
|
mSpTexts = new SpTexts(mContext);
|
||||||
if (DEBUG) Log.d(mTag, "new ZenModePanel");
|
if (DEBUG) Log.d(mTag, "new ZenModePanel");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,6 +165,7 @@ public class ZenModePanel extends LinearLayout {
|
|||||||
|
|
||||||
mZenIntroduction = findViewById(R.id.zen_introduction);
|
mZenIntroduction = findViewById(R.id.zen_introduction);
|
||||||
mZenIntroductionMessage = (TextView) findViewById(R.id.zen_introduction_message);
|
mZenIntroductionMessage = (TextView) findViewById(R.id.zen_introduction_message);
|
||||||
|
mSpTexts.add(mZenIntroductionMessage);
|
||||||
mZenIntroductionConfirm = findViewById(R.id.zen_introduction_confirm);
|
mZenIntroductionConfirm = findViewById(R.id.zen_introduction_confirm);
|
||||||
mZenIntroductionConfirm.setOnClickListener(new OnClickListener() {
|
mZenIntroductionConfirm.setOnClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -170,7 +173,7 @@ public class ZenModePanel extends LinearLayout {
|
|||||||
confirmZenIntroduction();
|
confirmZenIntroduction();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mZenIntroductionCustomize = findViewById(R.id.zen_introduction_customize);
|
mZenIntroductionCustomize = (TextView) findViewById(R.id.zen_introduction_customize);
|
||||||
mZenIntroductionCustomize.setOnClickListener(new OnClickListener() {
|
mZenIntroductionCustomize.setOnClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
@@ -180,6 +183,7 @@ public class ZenModePanel extends LinearLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
mSpTexts.add(mZenIntroductionCustomize);
|
||||||
|
|
||||||
mZenConditions = (LinearLayout) findViewById(R.id.zen_conditions);
|
mZenConditions = (LinearLayout) findViewById(R.id.zen_conditions);
|
||||||
mZenAlarmWarning = (TextView) findViewById(R.id.zen_alarm_warning);
|
mZenAlarmWarning = (TextView) findViewById(R.id.zen_alarm_warning);
|
||||||
@@ -661,9 +665,11 @@ public class ZenModePanel extends LinearLayout {
|
|||||||
}
|
}
|
||||||
if (tag.line1 == null) {
|
if (tag.line1 == null) {
|
||||||
tag.line1 = (TextView) row.findViewById(android.R.id.text1);
|
tag.line1 = (TextView) row.findViewById(android.R.id.text1);
|
||||||
|
mSpTexts.add(tag.line1);
|
||||||
}
|
}
|
||||||
if (tag.line2 == null) {
|
if (tag.line2 == null) {
|
||||||
tag.line2 = (TextView) row.findViewById(android.R.id.text2);
|
tag.line2 = (TextView) row.findViewById(android.R.id.text2);
|
||||||
|
mSpTexts.add(tag.line2);
|
||||||
}
|
}
|
||||||
final String line1 = !TextUtils.isEmpty(condition.line1) ? condition.line1
|
final String line1 = !TextUtils.isEmpty(condition.line1) ? condition.line1
|
||||||
: condition.summary;
|
: condition.summary;
|
||||||
|
|||||||
Reference in New Issue
Block a user