0
以下のコードではImageButton
の中にはImageButton
のものがあり、そのうちのhotel_englishとweatherの画像は直線レイアウトでは適切ではありません。ここで私はscaletype fillXYを適用していますので、私を助けてください。 Linear Layout
についてはImageButtonがファイリングアウトされていません
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/background"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:orientation="vertical"
android:weightSum="3">
<LinearLayout
android:id="@+id/hotelslayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
>
<ImageView
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:id="@+id/hotelsbtn"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/hotels_english"/>
</LinearLayout>
<LinearLayout
android:id="@+id/weatherlayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2">
<Button
android:scaleType="fitXY"
android:id="@+id/weatherbtn"
android:layout_below= "@+id/hotelsbtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/weather_english"/>
</LinearLayout>
<LinearLayout
android:id="@+id/trackerlayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight=".29">
<ImageButton
android:id="@+id/tackerbtn"
android:layout_below= "@+id/trackerbtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/tracker_english"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>