I'm trying to align 2 textviews by baseline and use autosize for textsize at the same time. Here is simplified code example. First textview has big size, so textsize auto set to some big value. Second textview smaller than first one so it has smaller auto determined textsize.
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<TextView
android:id="@+id/text1"
android:layout_width="200dp"
android:layout_height="100dp"
android:text="text1"
android:maxLines="1"
android:autoSizeTextType="uniform"
android:autoSizeMaxTextSize="200sp"
android:autoSizeMinTextSize="2sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/text2"
app:layout_constraintTop_toTopOf="parent"/>
<TextView
android:id="@+id/text2"
android:layout_width="50dp"
android:layout_height="20dp"
android:text="text2"
android:maxLines="1"
android:autoSizeTextType="uniform"
android:autoSizeMaxTextSize="200sp"
android:autoSizeMinTextSize="2sp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toRightOf="@+id/text1"
app:layout_constraintBaseline_toBaselineOf="@id/text1"/>
</android.support.constraint.ConstraintLayout>
The problem is that seems layout_constraintBaseline_toBaselineOf stops working as soon as I use autoSizeTextType
It would be nice if someone can point me right direction. Am I understand wrong how to use constraintlayout? Or is it just baseline_tobaseline does not work with autosize?