I want to fill the screen in a two-dimensional grid of 3x6 TextViews. This means that each TextView must be 1/3 of the full screen width and the height 1/6 of the full screen height. I am using a ConstraintLayout for this layout, since LinearLayouts are bad practise for this layout as nested weights are bad for performance. Currently, I am using the percentage 0.333333333333333 and 0.166666666666667 for respectively the width and height, as shown below.
<TextView
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toLeftOf="@id/text_view_theme_remove"
app:layout_constraintBottom_toTopOf="@id/text_view_theme_percentage"
app:layout_constraintWidth_default="percent"
app:layout_constraintWidth_percent="0.333333333333333"
app:layout_constraintHeight_default="percent"
app:layout_constraintHeight_percent="0.166666666666667"
android:gravity="center"
android:id="@+id/text_view_theme_unknown"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@android:color/transparent"
app:autoSizeTextType="uniform"
android:text="@string/unknown"/>
I was wondering whether it is possible to set the percentages as fractions? Thus for the width 1/3 and the height 1/6?