Androidのレイアウトで、%指定を行いたいのですが、うまく指定することができません。
イメージとしては画像のように2つのTextViewを画面トップから75%のいちに配置したいと考えております。
xml
TextViewの制約をつけている部分はこのように設定しているのですが、2つ目のTextViewが上に張り付いた形になってしまっています
xml
1<TextView 2 android:id="@+id/license_agreement" 3 android:text="@string/agreement_licenseagreement" 4 android:autoSizeMinTextSize="@dimen/myTextSizeT3" 5 android:layout_width="wrap_content" 6 android:textColor="@color/colorC6" 7 android:layout_height="wrap_content" 8 android:clickable="true" 9 app:layout_constraintTop_toTopOf="parent" 10 app:layout_constraintBottom_toBottomOf="parent" 11 app:layout_constraintVertical_bias="0.75" 12 tools:ignore="MissingConstraints" android:layout_marginStart="16dp" 13 app:layout_constraintStart_toStartOf="parent" 14 /> 15 <TextView 16 android:text="@string/agreement_adaptation" 17 android:autoSizeMinTextSize="@dimen/myTextSizeT3" 18 android:layout_width="wrap_content" 19 android:textColor="@color/colorC6" 20 android:layout_height="wrap_content" 21 android:id="@+id/textView" 22 tools:layout_editor_absoluteY="534dp" 23 tools:ignore="MissingConstraints" 24 app:layout_constraintVertical_bias="0.75" 25 app:layout_constraintStart_toEndOf="@+id/license_agreement"/>
どこが間違っているのでしょうか?
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。