如何从 GUI 角度制作适合手机和平板电脑的 Android 应用程序

发布于 2024-12-26 07:49:48 字数 280 浏览 2 评论 0原文

你好,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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

小红帽 2025-01-02 07:49:49
    <uses-sdk
      android:minSdkVersion="3"
      android:targetSdkVersion="4"/>
    <uses-sdk
      android:minSdkVersion="3"
      android:targetSdkVersion="4"/>
ゝ偶尔ゞ 2025-01-02 07:49:48

我假设您的意思是使用“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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文