私のアプリでは、このようにメニュー付きのビューを持っています...しかし、これらの4つのボタンをすべてのタイプの画面に適応させたい、つまり、これらのボタンに動的なサイズを持たせたいです...何か提案はありますか? ありがとう
これは私の現在のコードです...
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.game.SplashActivity" >
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/back_menu"
android:scaleType="centerCrop"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:src="@drawable/bt_1_player"
android:layout_weight="1"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:src="@drawable/bt_2_player"
android:layout_weight="1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:src="@drawable/challenge_bt"
android:layout_weight="1"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:src="@drawable/special_bt"
android:layout_weight="1"/>
</LinearLayout>