Android的 - 通用放大 [英] Android - Generic Zoom

查看:126
本文介绍了Android的 - 通用放大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有可以适用于一般的Andr​​oid设备上查看任何Android缩放的解决方案?

我的应用程序需要大量的信息推到屏幕上,并在某些手机上,屏幕是如此之小,这个数据变得不可读。

我想缩放功能,为TextView的年代和图像按钮尤其有效。我想,这两个内置的作品将为其他大部分工作了一个ZOOMVIEW。

我看了看周围的网站上,并没有发现任何简单的解决办法呢。大多数的讨论,似乎把重点放在缩放图像或网页视图。

如果没有一个现有的解决方案,任何人都可以提出一个很好的方法来走?


解决方案

  

有没有可以适用于一般的Andr​​oid设备上查看任何Android缩放的解决方案?


这是不可能的也许除了在Android 3.0。在Android 3.0(API等级11),你有 getScaleX() getScaleY()其中的可能的满足您的需求。


  

如果没有一个现有的解决方案,任何人都可以提出一个很好的方法来走?


设计一个不同的UI为小屏幕进行了优化。

或者,使用滚动型(或 Horizo​​ntalScrollView ),并使用更大的部件(有效pre-缩放你的内容)。

您可以尝试通过基于用户输入而改变文字大小,按钮大小,以实现自己的伪变焦(例如,选择菜单,放大/缩小),但我不知道如何将工作。

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 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.

这篇关于Android的 - 通用放大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆