Merge "Put accessibility labels for tabs." into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
dd7b1691ab
@@ -1608,6 +1608,8 @@ public class ResolverActivity extends Activity implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void resetTabsHeaderStyle(TabWidget tabWidget) {
|
private void resetTabsHeaderStyle(TabWidget tabWidget) {
|
||||||
|
String workContentDescription = getString(R.string.resolver_work_tab_accessibility);
|
||||||
|
String personalContentDescription = getString(R.string.resolver_personal_tab_accessibility);
|
||||||
for (int i = 0; i < tabWidget.getChildCount(); i++) {
|
for (int i = 0; i < tabWidget.getChildCount(); i++) {
|
||||||
View tabView = tabWidget.getChildAt(i);
|
View tabView = tabWidget.getChildAt(i);
|
||||||
TextView title = tabView.findViewById(android.R.id.title);
|
TextView title = tabView.findViewById(android.R.id.title);
|
||||||
@@ -1615,6 +1617,11 @@ public class ResolverActivity extends Activity implements
|
|||||||
title.setTextColor(getAttrColor(this, android.R.attr.textColorTertiary));
|
title.setTextColor(getAttrColor(this, android.R.attr.textColorTertiary));
|
||||||
title.setTextSize(TypedValue.COMPLEX_UNIT_PX,
|
title.setTextSize(TypedValue.COMPLEX_UNIT_PX,
|
||||||
getResources().getDimension(R.dimen.resolver_tab_text_size));
|
getResources().getDimension(R.dimen.resolver_tab_text_size));
|
||||||
|
if (title.getText().equals(getString(R.string.resolver_personal_tab))) {
|
||||||
|
tabView.setContentDescription(personalContentDescription);
|
||||||
|
} else if (title.getText().equals(getString(R.string.resolver_work_tab))) {
|
||||||
|
tabView.setContentDescription(workContentDescription);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5428,6 +5428,11 @@
|
|||||||
<!-- Label of a tab on a screen. A user can tap this tab to switch to the 'Work' view (that shows their work content) if they have a work profile on their device. [CHAR LIMIT=NONE] -->
|
<!-- Label of a tab on a screen. A user can tap this tab to switch to the 'Work' view (that shows their work content) if they have a work profile on their device. [CHAR LIMIT=NONE] -->
|
||||||
<string name="resolver_work_tab">Work</string>
|
<string name="resolver_work_tab">Work</string>
|
||||||
|
|
||||||
|
<!-- Accessibility label for the personal tab button. [CHAR LIMIT=NONE] -->
|
||||||
|
<string name="resolver_personal_tab_accessibility">Personal view</string>
|
||||||
|
<!-- Accessibility label for the work tab button. [CHAR LIMIT=NONE] -->
|
||||||
|
<string name="resolver_work_tab_accessibility">Work view</string>
|
||||||
|
|
||||||
<!-- Title of a screen. This text lets the user know that their IT admin doesn't allow them to share this specific content with work apps. [CHAR LIMIT=NONE] -->
|
<!-- Title of a screen. This text lets the user know that their IT admin doesn't allow them to share this specific content with work apps. [CHAR LIMIT=NONE] -->
|
||||||
<string name="resolver_cant_share_with_work_apps">Can\u2019t share this with work apps</string>
|
<string name="resolver_cant_share_with_work_apps">Can\u2019t share this with work apps</string>
|
||||||
<!-- Error message. This text is explaining that the user's IT admin doesn't allow this specific content to be shared with apps in the work profile. [CHAR LIMIT=NONE] -->
|
<!-- Error message. This text is explaining that the user's IT admin doesn't allow this specific content to be shared with apps in the work profile. [CHAR LIMIT=NONE] -->
|
||||||
|
|||||||
@@ -3885,7 +3885,9 @@
|
|||||||
|
|
||||||
<!-- Intent resolver and share sheet -->
|
<!-- Intent resolver and share sheet -->
|
||||||
<java-symbol type="string" name="resolver_personal_tab" />
|
<java-symbol type="string" name="resolver_personal_tab" />
|
||||||
|
<java-symbol type="string" name="resolver_personal_tab_accessibility" />
|
||||||
<java-symbol type="string" name="resolver_work_tab" />
|
<java-symbol type="string" name="resolver_work_tab" />
|
||||||
|
<java-symbol type="string" name="resolver_work_tab_accessibility" />
|
||||||
<java-symbol type="id" name="stub" />
|
<java-symbol type="id" name="stub" />
|
||||||
<java-symbol type="id" name="resolver_empty_state" />
|
<java-symbol type="id" name="resolver_empty_state" />
|
||||||
<java-symbol type="id" name="resolver_empty_state_icon" />
|
<java-symbol type="id" name="resolver_empty_state_icon" />
|
||||||
|
|||||||
Reference in New Issue
Block a user