I want to auto size a text view. I have the min and max size for text and the max height for the textview. I dont want to set a specific height for the text view. I am doing as below but its not working. It gives max height as text view height. How can it make the height to adjust as per the text
<android.support.v7.widget.AppCompatTextView
android:id="@+id/title"
android:layout_height="0dp"
app:layout_constraintHeight_max="@dimen/title_text_height"
app:layout_constraintHeight_default="spread"
app:layout_constraintWidth_max="480dp"
android:autoSizeTextType="uniform"
android:fontFamily="@font/lato_light"
android:maxLines="2"
android:text="@{title}"
android:textAlignment="center"
app:autoSizeMaxTextSize="@dimen/title_text_max_size"
app:autoSizeMinTextSize="@dimen/title_text_min_size"
app:layout_constraintBottom_toTopOf="@+id/date"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="@+id/left_margin_24"
app:layout_constraintEnd_toStartOf="@+id/right_margin_24"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="@dimen/space_top_or_bottom"
app:layout_constraintVertical_chainStyle="packed"
tools:text="testvtest"/>