我是Android新手,我正在開發應用程序。我已經閱讀了developers.google.com,如果我想要的應用程序屏幕兼容,那麼我的圖標應該在ldpi,mdpi,hdpi,xhdpi和android本身會選擇是這樣嗎?如果不是那麼我必須做它使屏幕兼容,以及如何給動態填充?像現在我的代碼看起來像這樣Android中的屏幕兼容性問題
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/splash_page"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_alignParentBottom="true"
android:gravity="center_vertical">
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="600dp"
android:layout_gravity="center_horizontal"
android:background="@drawable/icon_login_btn"/>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:paddingTop="40dp"
android:background="@drawable/icon_btn_register" />
</LinearLayout>
</RelativeLayout>
所以,你在這裏看到我有給利潤率最高,但僅限於沒有在大屏幕手機平板電腦的工作。
如果ip ut mdpi,ldpi中不同大小的圖像,那麼我也必須這樣做? – user2930808
是的,親愛的把所有圖像放在可繪製的文件夾中,並根據屏幕尺寸進行所有佈局:)你必須爲resd文件夾中的所有屏幕支持 –
做到這一點,我必須首先爲layout-hdpi文件夾創建layout-mdpi文件夾,那? – user2930808