Skip to content

Commit b4d593b

Browse files
romanbbGerrit Code Review
authored andcommitted
SystemUI: update qs tile hint and header view on locale change
Ticket: CYNGNOS-2814 Change-Id: I305ac5eca862ffa5c525ec6b39bfeddf03719227 Signed-off-by: Roman Birg <roman@cyngn.com>
1 parent 0b4226b commit b4d593b

4 files changed

Lines changed: 16 additions & 2 deletions

File tree

packages/SystemUI/res/layout/qs_tile_top.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@
5454
android:orientation="horizontal">
5555

5656
<TextView
57+
android:id="@+id/edit_text_instruction"
5758
android:layout_width="0dp"
5859
android:layout_height="match_parent"
5960
android:gravity="center_vertical"
6061
android:layout_weight="1"
6162
android:textColor="@color/qs_edit_header_instruction_text_color"
62-
android:text="@string/qs_tile_edit_header_instruction"
6363
android:contentDescription="@null"/>
6464

6565
<ImageView

packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1869,10 +1869,11 @@ public void updateResources() {
18691869
for (TileRecord r : mRecords) {
18701870
r.tile.clearState();
18711871
}
1872+
updateDetailText();
1873+
mQsPanelTop.updateResources();
18721874
if (mListening) {
18731875
refreshAllTiles();
18741876
}
1875-
updateDetailText();
18761877
}
18771878
}
18781879

packages/SystemUI/src/com/android/systemui/qs/QSPanelTopView.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public class QSPanelTopView extends FrameLayout {
5353
protected View mBrightnessView;
5454
protected TextView mToastView;
5555
protected View mAddTarget;
56+
protected TextView mEditInstructionText;
5657

5758
private boolean mEditing = false;
5859
private boolean mDisplayingInstructions = false;
@@ -112,6 +113,14 @@ protected void onFinishInflate() {
112113
mBrightnessView = findViewById(R.id.brightness_container);
113114
mToastView = (TextView) findViewById(R.id.qs_toast);
114115
mAddTarget = findViewById(R.id.add_target);
116+
mEditInstructionText = (TextView) findViewById(R.id.edit_text_instruction);
117+
updateResources();
118+
}
119+
120+
public void updateResources() {
121+
if (mEditInstructionText != null) {
122+
mEditInstructionText.setText(R.string.qs_tile_edit_header_instruction);
123+
}
115124
}
116125

117126
@Override

packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ protected void onConfigurationChanged(Configuration newConfig) {
281281
mClockExpandedSize = getResources().getDimensionPixelSize(R.dimen.qs_time_expanded_size);
282282
mClockCollapsedScaleFactor = (float) mClockCollapsedSize / (float) mClockExpandedSize;
283283

284+
if (mEditTileDoneText != null) {
285+
mEditTileDoneText.setText(R.string.quick_settings_done);
286+
}
287+
284288
updateClockScale();
285289
updateClockCollapsedMargin();
286290
}

0 commit comments

Comments
 (0)