如何从 GUI 角度制作适合手机和平板电脑的 Android 应用程序
你好,Guyz,我知道 android 说如果你正在使用 gui,请根据 dp 调整你的布局位置,但在现实生活中,我面临着即使 dp 在我的应用程序中也没有好处,我在布局调整中使用 dp,但最终在测试模式下我们检查了不同手机布局中的应用程序没有调整......最后我们用代码处理了它
现在我们有另一个目标我们希望我们的相同应用程序与平板电脑兼容......
(1)我的应用程序在每个地方都使用自定义列表
视图我可以使我的应用程序兼容与平板电脑和手机。 我只是需要帮助,
提前致谢
hi guyz i know android says if u are working with gui adjust your layout positions in term of dp but in real life i faced that even dp is not benifial in my application i was using dp in layout adjustment but in the end in testing mode when we checked our application in different mobiles layout was not adjusting....and at last we handled it with code
now we have another target we want our same application compatible with Tablets...
(1) my application using Custom listview every where
how i can make compatible my app with tablet as well as mobile.
i just need help
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用碎片。
http://developer.android.com/guide/topics/fundamentals/fragments.html
Use fragments.
http://developer.android.com/guide/topics/fundamentals/fragments.html
我假设您的意思是使用“dip”(密度独立像素)。话虽如此,您考虑过使用 Fragments 吗?片段应该有助于使代码更具可重用性,并更容易支持平板电脑视图和较小的屏幕视图(手机)。
请参阅此处: http://developer.android.com/guide/topics/fundamentals/片段.html
在这里: http://mobile.tutsplus.com/tutorials/android/android -tablet-design/ (一些教程)
我相信你至少需要 API 3。
I'm assuming you mean using "dip" (density Independent pixels). With that said, have you looked at using Fragments? Fragments should help make the code more re-usable, and support tablet views and smaller screen views (phones) easier.
See here: http://developer.android.com/guide/topics/fundamentals/fragments.html
And here: http://mobile.tutsplus.com/tutorials/android/android-tablet-design/ (for a little tutorial)
You'll need API 3 at least, I believe.