开发者

Android - Generic Zoom

开发者 https://www.devze.com 2023-02-24 04:25 出处:网络
Are there any android zooming solutions that can be applied to a generic android view? My app needs to push a lot of information onto the screen, and on some phones, screen is so small that this dat

Are there any android zooming solutions that can be applied to a generic android view?

My app needs to push a lot of information onto the screen, and on some phones, screen is so small that this data becomes unreadable.

I want to get zooming functionality that works for textview's and image buttons in particular. I imagine a zoomView that works for these two built-in's would work for most of the others too.

I've looked around on the web and haven't found any easy solution yet. Most 开发者_Python百科of the discussion seems to be focused on zooming images or a webview.

If there is not an existing solution, can anyone suggest a good approach to take?


Are there any android zooming solutions that can be applied to a generic android view?

That is not possible except perhaps on Android 3.0. On Android 3.0 (API Level 11), you have getScaleX() and getScaleY() which might suit your needs.

If there is not an existing solution, can anyone suggest a good approach to take?

Design a different UI optimized for smaller screens.

Or, use a ScrollView (or HorizontalScrollView) and use bigger widgets (effectively pre-zooming your content).

You can try to implement your own pseudo-zoom by changing the text size and button sizes based upon user input (e.g., options menus to zoom in/out), but I'm not sure how well that will work.

0

精彩评论

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

关注公众号