Merge "Settings: change the TTS text to use the current locale" into nyc-dev
am: b1cdea67a5
* commit 'b1cdea67a5e2dda1ece17df4b98f20e7eeaa8a46':
Settings: change the TTS text to use the current locale
Change-Id: I1f7098ef1541f9ce89b2fdf2e701cd87166ba777
This commit is contained in:
@@ -152,8 +152,9 @@ class LocaleDragAndDropAdapter
|
|||||||
public void onBindViewHolder(final CustomViewHolder holder, int i) {
|
public void onBindViewHolder(final CustomViewHolder holder, int i) {
|
||||||
final LocaleStore.LocaleInfo feedItem = mFeedItemList.get(i);
|
final LocaleStore.LocaleInfo feedItem = mFeedItemList.get(i);
|
||||||
final LocaleDragCell dragCell = holder.getLocaleDragCell();
|
final LocaleDragCell dragCell = holder.getLocaleDragCell();
|
||||||
String label = feedItem.getFullNameNative();
|
final String label = feedItem.getFullNameNative();
|
||||||
dragCell.setLabel(label);
|
final String description = feedItem.getFullNameInUiLanguage();
|
||||||
|
dragCell.setLabelAndDescription(label, description);
|
||||||
dragCell.setLocalized(feedItem.isTranslated());
|
dragCell.setLocalized(feedItem.isTranslated());
|
||||||
dragCell.setMiniLabel(mNumberFormatter.format(i + 1));
|
dragCell.setMiniLabel(mNumberFormatter.format(i + 1));
|
||||||
dragCell.setShowCheckbox(mRemoveMode);
|
dragCell.setShowCheckbox(mRemoveMode);
|
||||||
@@ -166,7 +167,7 @@ class LocaleDragAndDropAdapter
|
|||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
LocaleStore.LocaleInfo feedItem =
|
LocaleStore.LocaleInfo feedItem =
|
||||||
(LocaleStore.LocaleInfo) holder.getLocaleDragCell().getTag();
|
(LocaleStore.LocaleInfo) dragCell.getTag();
|
||||||
feedItem.setChecked(isChecked);
|
feedItem.setChecked(isChecked);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@@ -87,9 +87,11 @@ class LocaleDragCell extends RelativeLayout {
|
|||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLabel(String labelText) {
|
public void setLabelAndDescription(String labelText, String description) {
|
||||||
mLabel.setText(labelText);
|
mLabel.setText(labelText);
|
||||||
mCheckbox.setText(labelText);
|
mCheckbox.setText(labelText);
|
||||||
|
mLabel.setContentDescription(description);
|
||||||
|
mCheckbox.setContentDescription(description);
|
||||||
invalidate();
|
invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user