我如何使用Android ZoomButtonsController? [英] How do I use Android ZoomButtonsController?
问题描述
OK,我在我无计可施。
我不知道如何使用android.widget.ZoomButtonsController 。我想要的是有一个缩放控件我[展示|隐藏| [启用|禁用]变焦[IN | OUT]按钮]对我的看法。我不能把它添加到我的布局XML,当我在我的onCreate实例化,我看不到它在屏幕上。
查看浏览器= ...
ZoomButtonsController控制器=新ZoomButtonsController(观众);
controller.setVisible(真);
我希望,你需要调用 getZoomControls()
在 ZoomButtonsController
,然后添加到您的布局不管你想要的按钮出现。你可以让你的视图层次的快照 hierarchyviewer
时的变焦控制是理论上的可见确认理论 - 如果他们不是在你看来hiearchy,则需要添加它们。
OK, I'm at the end of my wits.
I have no idea how to use android.widget.ZoomButtonsController. All I want is to have a zoom controls which I [show|hide|[enable|disable] zoom [in|out] buttons] for my View. I can't add it to my layout xml, and when I instantiate it in my onCreate, I can't see it on the screen.
View viewer = ...
ZoomButtonsController controller = new ZoomButtonsController(viewer);
controller.setVisible(true);
I would expect that you need to call getZoomControls()
on the ZoomButtonsController
, then add that to your layout wherever you want the buttons to appear. You can confirm that theory by getting a snapshot of your view hierarchy with hierarchyviewer
when the zoom controls are theoretically visible -- if they are not in your view hiearchy, then you will need to add them.
这篇关于我如何使用Android ZoomButtonsController?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!