Merge "Put accessibility labels for tabs." into rvc-dev am: dd7b1691ab am: 034496d31e am: e0daed977e
Change-Id: I1d82f711a287ebb6438ed7c3974c55cc84709a25
This commit is contained in:
@@ -1608,6 +1608,8 @@ public class ResolverActivity extends Activity implements
|
||||
}
|
||||
|
||||
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++) {
|
||||
View tabView = tabWidget.getChildAt(i);
|
||||
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.setTextSize(TypedValue.COMPLEX_UNIT_PX,
|
||||
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] -->
|
||||
<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] -->
|
||||
<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] -->
|
||||
|
||||
@@ -3886,7 +3886,9 @@
|
||||
|
||||
<!-- Intent resolver and share sheet -->
|
||||
<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_accessibility" />
|
||||
<java-symbol type="id" name="stub" />
|
||||
<java-symbol type="id" name="resolver_empty_state" />
|
||||
<java-symbol type="id" name="resolver_empty_state_icon" />
|
||||
|
||||
Reference in New Issue
Block a user