谁能解释一下如何制作适合大多数设备屏幕的 android 应用程序?我从文档中看不懂任何东西

Can anyone explain me how to make android app which can fit on most of devices screens?I did not understand any thing from documentation

当我尝试制作一些 android 应用程序时,它似乎对某些设备非常好,但在某些其他设备(大多数具有较低的 android API 版本)上它确实如此看起来没有那么好。有时某些视图(如按钮)超出屏幕尺寸。 我已阅读 Google.But 提供的文档 我不明白 anything.As 我是一名新手,所以它给我带来了很多问题。如果有人有时间,请帮助我以最简单的方式理解这件事。 提前致谢。

大部分时间我使用 ssp 和 sdp。 ssp 文本的可缩放大小单位是 android SDK,它提供了一个新的大小单位 - ssp(可缩放 sp)。此尺寸单位根据 sp 尺寸单位(用于文本)随屏幕尺寸缩放。它可以帮助 Android 开发人员支持多个 screens.and sdp 这是应该用于非文本视图的 sdp 大小单位的兄弟。 [https://github.com/intuit/ssp][1] and [https://github.com/intuit/sdp][1] 使用 gradle 并像下面这样编译库

compile 'com.intuit.sdp:sdp-android:1.0.4'
    compile 'com.intuit.ssp:ssp-android:1.0.4'

在您的布局中 activity xml 例如,您可以像这样提供文本

android:textSize="@dimen/_16ssp" 

布局

android:layout_height="@dimen/_16sdp"

这将照顾到任何屏幕享受。

请完成这个https://developer.android.com/guide/practices/screens_support.html

为布局定义额外的最小宽度布局:

res/layout/main_activity.xml # 对于手机(可用宽度小于 600dp)

res/layout-sw600dp/main_activity.xml # 对于 7 英寸平板电脑(600dp 宽和更大)

res/layout-sw720dp/main_activity.xml # 对于 10 英寸平板电脑(720dp 宽和更大)

res/layout-sw600dp-land/main_activity.xml # 横向模式的布局。

例如,见下图