add accessibility descriptions/events
Bug: 4979091
added content descriptions to the image buttons
send event for screen transition
Change-Id: I403fe8504cace4aa84a5b1c6ca18f6c10fc9be34
diff --git a/src/com/android/browser/NavigationBarPhone.java b/src/com/android/browser/NavigationBarPhone.java
index 388c262..8173377 100644
--- a/src/com/android/browser/NavigationBarPhone.java
+++ b/src/com/android/browser/NavigationBarPhone.java
@@ -40,6 +40,8 @@
private ImageView mVoiceButton;
private Drawable mStopDrawable;
private Drawable mRefreshDrawable;
+ private String mStopDescription;
+ private String mRefreshDescription;
private View mTabSwitcher;
private View mComboIcon;
private View mTitleContainer;
@@ -78,6 +80,8 @@
Resources res = getContext().getResources();
mStopDrawable = res.getDrawable(R.drawable.ic_stop_holo_dark);
mRefreshDrawable = res.getDrawable(R.drawable.ic_refresh_holo_dark);
+ mStopDescription = res.getString(R.string.accessibility_button_stop);
+ mRefreshDescription = res.getString(R.string.accessibility_button_refresh);
mTextfieldBgDrawable = res.getDrawable(R.drawable.textfield_active_holo_dark);
setUaSwitcher(mComboIcon);
mUrlInput.setContainer(this);
@@ -98,6 +102,7 @@
super.onProgressStarted();
if (mStopButton.getDrawable() != mStopDrawable) {
mStopButton.setImageDrawable(mStopDrawable);
+ mStopButton.setContentDescription(mStopDescription);
if (mStopButton.getVisibility() != View.VISIBLE) {
mComboIcon.setVisibility(View.GONE);
mStopButton.setVisibility(View.VISIBLE);
@@ -109,6 +114,7 @@
public void onProgressStopped() {
super.onProgressStopped();
mStopButton.setImageDrawable(mRefreshDrawable);
+ mStopButton.setContentDescription(mRefreshDescription);
if (!isEditingUrl()) {
mComboIcon.setVisibility(View.VISIBLE);
}