适用于多种分辨率平板电脑的 Android 应用
如何为多种分辨率(如 1024x600 像素或 1280x800 像素)的平板电脑制作 Android 应用程序。我制作了一个分辨率为 1024x600 的应用程序,但它在分辨率为 1280x800 的平板电脑上完全扭曲了...... 任何帮助...
提前致谢...
How to make an android applications for tablet of multiple resolutions like 1024x600pixels or 1280x800 pixels. I had made an app for the resolution 1024x600 but it completely get distorted on the the tablet of resolution 1280x800...
Any Help....
Thanks in advance....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
步骤#1:用 XML 布局资源替换“以编程方式处理所有活动的整个布局”。恕我直言,虽然可以完全用 Java 定义 UI 并处理多种屏幕尺寸,但这是为专家 Android 开发人员保留的技术。换句话说,如果您必须问“如何为多种分辨率的平板电脑制作Android应用程序”,那么您缺乏“以编程方式处理所有活动的整个布局”所需的经验。
步骤#2:遵循 Android 开发者文档的指南,了解支持多种屏幕尺寸 。
步骤#3:如果您仍然有问题,请提出更具体、更有针对性和更长的问题。换句话说,具体解释您的问题是什么,提供给您带来问题的代码/布局 XML,并提供屏幕截图来说明您得到的输出。
Step #1: Replace your "handling the whole layout programmatically for all the activities" with XML layout resources. IMHO, while it is possible to define your UIs totally in Java and handle multiple screen sizes, that is a technique reserved for expert Android developers. In other words, if you have to ask "how to make an android applications for tablet of multiple resolutions", then you lack the experience necessary to be "handling the whole layout programmatically for all the activities".
Step #2: Follow the guidance of the Android developer documentation for supporting multiple screen sizes.
Step #3: If you still have problems, ask more specific, focused, and longer questions. In other words, explain specifically what your problem is, supply the code/layout XML that is giving you problems, and supply screenshots to illustrate the output you are getting.