Merge "[Settings] Fix the layout index" into udc-dev am: cd719845d6
am: affb6ad3c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22573648 Change-Id: Id1ec4f1e555b5a29c33fba3ce82d44c1f598c2e8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -63,13 +63,7 @@ class LocaleDragCell extends RelativeLayout {
|
||||
|
||||
public void setShowCheckbox(boolean showCheckbox) {
|
||||
// "Opposite" visibility for label / checkbox
|
||||
if (showCheckbox) {
|
||||
mCheckbox.setVisibility(VISIBLE);
|
||||
mLabel.setVisibility(INVISIBLE);
|
||||
} else {
|
||||
mCheckbox.setVisibility(INVISIBLE);
|
||||
mLabel.setVisibility(VISIBLE);
|
||||
}
|
||||
mCheckbox.setVisibility(showCheckbox ? VISIBLE : GONE);
|
||||
invalidate();
|
||||
requestLayout();
|
||||
}
|
||||
@@ -91,9 +85,7 @@ class LocaleDragCell extends RelativeLayout {
|
||||
|
||||
public void setLabelAndDescription(String labelText, String description) {
|
||||
mLabel.setText(labelText);
|
||||
mCheckbox.setText(labelText);
|
||||
mLabel.setContentDescription(description);
|
||||
mCheckbox.setContentDescription(description);
|
||||
invalidate();
|
||||
}
|
||||
|
||||
@@ -114,6 +106,10 @@ class LocaleDragCell extends RelativeLayout {
|
||||
return mDragHandle;
|
||||
}
|
||||
|
||||
public TextView getLabelView() {
|
||||
return mLabel;
|
||||
}
|
||||
|
||||
public CheckBox getCheckbox() {
|
||||
return mCheckbox;
|
||||
}
|
||||
|
@@ -86,7 +86,7 @@ public class LocaleLinearLayoutManager extends LinearLayoutManager {
|
||||
// any language can handle it. And we want the position to be part of it.
|
||||
// So we use something like "2, French (France)"
|
||||
final String description =
|
||||
(position + 1) + ", " + dragCell.getCheckbox().getContentDescription();
|
||||
(position + 1) + ", " + dragCell.getLabelView().getContentDescription();
|
||||
info.setContentDescription(description);
|
||||
|
||||
if (mAdapter.isRemoveMode()) { // We don't move things around in remove mode
|
||||
|
Reference in New Issue
Block a user