diff options
author | John Reck <jreck@google.com> | 2012-09-04 18:13:51 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-09-04 18:13:51 -0700 |
commit | 1cc1d1d08c50211e4f9f8407978d0435a0110375 (patch) | |
tree | f42f02d2981a8bf8d30e3df945e62e13dacdc52c /src/com/android/browser/TitleBar.java | |
parent | d9719732b9e02d1236138d2f76eddf9ca2dbd2b7 (diff) | |
download | packages_apps_Browser-1cc1d1d08c50211e4f9f8407978d0435a0110375.zip packages_apps_Browser-1cc1d1d08c50211e4f9f8407978d0435a0110375.tar.gz packages_apps_Browser-1cc1d1d08c50211e4f9f8407978d0435a0110375.tar.bz2 |
Use a fixed title bar if accessibility is enabled
Bug: 6940152
Change-Id: Id6f694d8334a7c50f2e6f6c481bbb3cff847860f
Diffstat (limited to 'src/com/android/browser/TitleBar.java')
-rw-r--r-- | src/com/android/browser/TitleBar.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java index f5be5d3..874296a 100644 --- a/src/com/android/browser/TitleBar.java +++ b/src/com/android/browser/TitleBar.java @@ -26,6 +26,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.ViewStub; +import android.view.accessibility.AccessibilityManager; import android.view.animation.Animation; import android.view.animation.Animation.AnimationListener; import android.view.animation.AnimationUtils; @@ -47,6 +48,7 @@ public class TitleBar extends RelativeLayout { private BaseUi mBaseUi; private FrameLayout mContentView; private PageProgressView mProgress; + private AccessibilityManager mAccessibilityManager; private AutologinBar mAutoLogin; private NavigationBarBase mNavBar; @@ -66,6 +68,7 @@ public class TitleBar extends RelativeLayout { mUiController = controller; mBaseUi = ui; mContentView = contentView; + mAccessibilityManager = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE); initLayout(context); setFixedTitleBar(); } @@ -118,6 +121,7 @@ public class TitleBar extends RelativeLayout { private void setFixedTitleBar() { boolean isFixed = !mUseQuickControls && !mContext.getResources().getBoolean(R.bool.hide_title); + isFixed |= mAccessibilityManager.isEnabled(); // If getParent() returns null, we are initializing ViewGroup parent = (ViewGroup)getParent(); if (mIsFixedTitleBar == isFixed && parent != null) return; @@ -436,4 +440,8 @@ public class TitleBar extends RelativeLayout { } } + public void onResume() { + setFixedTitleBar(); + } + } |