我正在開發一個android應用程序,它有一個按鈕和images.I需要使它響應。如果我使用更大的設備,如平板電腦,它顯示的控件很小。當我在橫向模式下使用時,它會顯示一半的控件或項目。我如何克服這一點並使我的應用程序能夠響應所有設備。我在下面附加了我的一個XML代碼。Android應用程序響應(適合所有屏幕尺寸)
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:orientation="vertical"
>
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="125dp"
android:layout_marginTop="50dp"
android:layout_weight="0.01"
android:adjustViewBounds="true"
>
</ImageView>
<LinearLayout
android:id="@+id/layButtonH"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0.01"
android:layout_marginTop="20dp"
android:gravity="center"
android:orientation="vertical" >
<Button
android:id="@+id/addnew"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" ADD NEW "
android:background="@drawable/button_shape"
android:textColor="#FFFFFF"/>
<Button
android:id="@+id/open"
android:background="@drawable/button_shape_cancel"
android:layout_marginTop="30dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" OPEN "
android:textColor="#FFFFFF" />
<Button
android:id="@+id/Register"
android:background="@drawable/button_shape_cancel"
android:layout_marginTop="30dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" LOGIN "
android:textColor="#FFFFFF" />
</LinearLayout>