开发者

How to make android zoom control auto disappear like the built in zoom controls do

I had to change the position of the 开发者_运维知识库zoomcontrols. For this purpose, I used android zoom controls and implemented zoom in and zoom out functions in its listener. However, now i was thinking them to behave in the same manner the built in zoom controls do i.e. they auto disappear. How to do it as i don't want the android zoom control to stay forever on the screen.

Thanks Astha


Apply an AlphaAnimation to the widget, going from an alpha of 1.0 (opaque) to 0.0 (transparent). Start the animation whenever you want it to fade out. Set up an AnimationListener on the AlphaAnimation to call setVisibility(View.GONE) on the widget when the animation ends. When you want the widget to re-appear, call setVisibility(View.VISIBLE).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜