The XML below says height should be 6% of the height of the entire ConstraintLayout
, not the parent's view. This particular ConstraintLayout
is about 2.5 screens high in a ScrollView
How can I get the height to be 6% of the screen height?
<TextView
android:id="@+id/udpate_profile"
app:layout_constraintTop_toBottomOf="@+id/boardgames"
android:layout_marginTop="50dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_width="0dp"
app:layout_constraintHeight_percent="0.06"
android:layout_height="0dp"
android:text="@string/update_profile"
android:tag="update"
android:gravity="center"
android:textSize="18sp"
android:textColor="@color/white_color"
android:background="@color/orange_color"
android:lines="1"
/>