Код - это простой XML-файл, содержащий линейный макет. Внутри линейного макета у меня есть два текстовых вида и один линейный макет, содержащий кнопку. Я хочу установить размер шрифта, равный высоте текстового вида. Мы получаем высоту с использованием метода веса и веса.Как установить размер шрифта в текстовом виде, равном его высоте
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/orange"
android:weightSum="100"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="45"
android:text="Coming Soon"
android:gravity="center_vertical"
android:background="@color/mainscreen" />
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_weight="10"
android:text="TextView" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_weight="45"
android:background="@color/mainscreen">
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
</LinearLayout>