diff options
author | Michael Kolb <kolby@google.com> | 2011-07-29 13:37:05 -0700 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2011-07-29 15:03:46 -0700 |
commit | 30adae6ebf17a724d24066a200432e6b22a4eeff (patch) | |
tree | a16abcb20629633f894e4e7aa4c38dca5ae73c8a /src/com/android/browser/NavigationBarPhone.java | |
parent | 1b9353cbf59678721d48313cb92189a1530f0483 (diff) | |
download | packages_apps_Browser-30adae6ebf17a724d24066a200432e6b22a4eeff.zip packages_apps_Browser-30adae6ebf17a724d24066a200432e6b22a4eeff.tar.gz packages_apps_Browser-30adae6ebf17a724d24066a200432e6b22a4eeff.tar.bz2 |
add accessibility descriptions/events
Bug: 4979091
added content descriptions to the image buttons
send event for screen transition
Change-Id: I403fe8504cace4aa84a5b1c6ca18f6c10fc9be34
Diffstat (limited to 'src/com/android/browser/NavigationBarPhone.java')
-rw-r--r-- | src/com/android/browser/NavigationBarPhone.java | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ public class NavigationBarPhone extends NavigationBarBase implements 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 @@ public class NavigationBarPhone extends NavigationBarBase implements 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 @@ public class NavigationBarPhone extends NavigationBarBase implements 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 class NavigationBarPhone extends NavigationBarBase implements public void onProgressStopped() { super.onProgressStopped(); mStopButton.setImageDrawable(mRefreshDrawable); + mStopButton.setContentDescription(mRefreshDescription); if (!isEditingUrl()) { mComboIcon.setVisibility(View.VISIBLE); } |