-2
enter image description here ImageViewのlayout_widthとlayout_heightをmatch_parentに設定しようとしましたが、自動的に274dpと495dpに変更されます。それらをmatch_parentに設定するには?ImageViewの幅と高さをmatch_parentに設定
enter image description here ImageViewのlayout_widthとlayout_heightをmatch_parentに設定しようとしましたが、自動的に274dpと495dpに変更されます。それらをmatch_parentに設定するには?ImageViewの幅と高さをmatch_parentに設定
match_parentをConstraintLayoutの子のディメンションとして使用することはできません。あなたは「match_constraint」を意味0dpを使用して、親の側面に側面を制約する必要があります
は、2のいずれかを選択します。
android:layout_width="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
または
android:layout_height="0dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
をあなたは親として、制約レイアウトを使用していますか? –
コードを投稿してください。あなたが変なことをしているのでなければ、それは他のどの時とも異なるものであってはなりませんmatch_parent –
他の人が理解を深めるのを助けるために、状況のイメージをあなたのコードに含めてください。 – UmarZaii