前提・実現したいこと
ConstraintLayoutで作成している画面へLinearLayoutを追加し、画面の下に寄せる。
発生している問題・エラーメッセージ
android:layout_alignParentBottom="true"を使用しているが一番上になってしまう
該当のソースコード
xml
1xmlファイル 2<android.support.constraint.ConstraintLayout 3 xmlns:android="http://schemas.android.com/apk/res/android" 4 xmlns:tools="http://schemas.android.com/tools" 5 xmlns:app="http://schemas.android.com/apk/res-auto" 6 android:layout_width="match_parent" 7 android:layout_height="match_parent" 8 tools:context=".SubActivity"> 9 <LinearLayout 10 android:id="@+id/footerlayout" 11 android:layout_width="match_parent" 12 android:layout_height="48dp" 13 android:layout_alignParentBottom="true" 14 android:background="@color/ncolor" > 15 16 <RadioGroup 17 android:id="@+id/radioGroup2" 18 android:layout_width="match_parent" 19 android:layout_height="match_parent" 20 android:orientation="horizontal" > 21 22 <RadioButton 23 android:id="@+id/radio_1" 24 android:layout_width="0dp" 25 android:layout_height="match_parent" 26 android:layout_weight="1" 27 android:background="@drawable/untitled" 28 android:button="@null" 29 android:checked="true" /> 30 31 <RadioButton 32 android:id="@+id/radio_2" 33 android:layout_width="0dp" 34 android:layout_height="match_parent" 35 android:layout_weight="1" 36 android:background="@drawable/untitled" 37 android:button="@null" /> 38 39 <RadioButton 40 android:id="@+id/radio_3" 41 android:layout_width="0dp" 42 android:layout_height="match_parent" 43 android:layout_weight="1" 44 android:background="@drawable/untitled" 45 android:button="@null" /> 46 </RadioGroup> 47 </LinearLayout>
試したこと
補足情報(FW/ツールのバージョンなど)
androidstudio3.2.1
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。