diff options
author | Steve Howard <showard@google.com> | 2010-04-12 14:46:09 -0700 |
---|---|---|
committer | Steve Howard <showard@google.com> | 2010-04-13 11:55:02 -0700 |
commit | 16bd9372ee724b78d96fbddd551aa3e42a8451a6 (patch) | |
tree | ea3567d44e0892c7d08ab577e98096c565f15307 /core/java/android/widget | |
parent | aedb01dcc757f8f62107b98e3d239a9ef88d6aed (diff) | |
download | frameworks_base-16bd9372ee724b78d96fbddd551aa3e42a8451a6.zip frameworks_base-16bd9372ee724b78d96fbddd551aa3e42a8451a6.tar.gz frameworks_base-16bd9372ee724b78d96fbddd551aa3e42a8451a6.tar.bz2 |
Hide zoom buttons when a view gets hidden, i.e. by a TabHost
When a View uses a ZoomButtonsController, it needs to explicitly hide
the zoom controls when it gets hidden itself, such as when it's within
a TabHost. Add a note to the javadoc to do this via
onVisibilityChanged(), and update WebView to follow the instructions.
Thanks to Ross Levinsky for discovering and tracking this one down.
Bug: 2582718
Change-Id: Ia0c9ea4efcb29eb1f321be54f3d8ae1e056df6b7
CC: rosslevinsky@google.com
Diffstat (limited to 'core/java/android/widget')
-rw-r--r-- | core/java/android/widget/ZoomButtonsController.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/widget/ZoomButtonsController.java b/core/java/android/widget/ZoomButtonsController.java index 3df419a..450c966 100644 --- a/core/java/android/widget/ZoomButtonsController.java +++ b/core/java/android/widget/ZoomButtonsController.java @@ -66,8 +66,9 @@ import android.view.WindowManager.LayoutParams; * {@link #setZoomInEnabled(boolean)} and {@link #setZoomOutEnabled(boolean)}. * <p> * If you are using this with a custom View, please call - * {@link #setVisible(boolean) setVisible(false)} from the - * {@link View#onDetachedFromWindow}. + * {@link #setVisible(boolean) setVisible(false)} from + * {@link View#onDetachedFromWindow} and from {@link View#onVisibilityChanged} + * when <code>visibility != View.VISIBLE</code>. * */ public class ZoomButtonsController implements View.OnTouchListener { |