Issue
I did this code but the image pushed out the work space
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constrainsalah"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/image1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintPortraitHeight_percent="0.15"
app:layout_constraintLandscapeHeight_percent="0.2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</androidx.constraintlayout.widget.ConstraintLayout>
Solution
If I get your question correctly, Change the
app:layout_constraintPortraitHeight_percent="0.15"
app:layout_constraintLandscapeHeight_percent="0.2"
to
app:layout_constraintHeight_percent="0.2"
and add this on the line
app:layout_constraintVertical_bias="0.0" android:fillViewport="true"
Copy this code instead
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constrainsalah"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/image1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" android:fillViewport="true">
</androidx.constraintlayout.widget.ConstraintLayout>
Answered By - Apex
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.