| <?xml version="1.0" encoding="utf-8"?> |
| <!-- Copyright (C) 2017 The Android Open Source Project |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <LinearLayout |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| xmlns:app="http://schemas.android.com/apk/res-auto" |
| android:id="@+id/container" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:orientation="vertical"> |
| |
| <androidx.appcompat.widget.AppCompatTextView |
| android:id="@+id/view_autosize_uniform" |
| android:layout_width="100dp" |
| android:layout_height="200dp" |
| android:text="@string/sample_text1" |
| app:autoSizeTextType="uniform" |
| app:autoSizeMinTextSize="2px" |
| app:autoSizeMaxTextSize="50dp" |
| app:autoSizeStepGranularity="1px" /> |
| |
| <androidx.appcompat.widget.AppCompatTextView |
| android:id="@+id/view_autosize_uniform_predef_sizes" |
| android:layout_width="100dp" |
| android:layout_height="200dp" |
| android:text="@string/sample_text1" |
| app:autoSizeTextType="uniform" |
| app:autoSizePresetSizes="@array/auto_size_predefined_sizes" /> |
| |
| <androidx.appcompat.widget.AppCompatTextView |
| android:id="@+id/view_autosize_uniform_predef_sizes_redundant_values" |
| android:layout_width="100dp" |
| android:layout_height="200dp" |
| android:text="@string/sample_text1" |
| app:autoSizeTextType="uniform" |
| app:autoSizePresetSizes="@array/auto_size_predefined_sizes_redundant_values" /> |
| |
| <androidx.appcompat.widget.AppCompatTextView |
| android:id="@+id/view_text" |
| android:layout_width="100dp" |
| android:layout_height="200dp" |
| android:text="@string/sample_text1" /> |
| |
| <androidx.appcompat.widget.AppCompatEditText |
| android:id="@+id/edittext_autosize_uniform" |
| android:layout_width="100dp" |
| android:layout_height="200dp" |
| android:text="@string/sample_text1" |
| app:autoSizeTextType="uniform" |
| app:autoSizeMinTextSize="2px" |
| app:autoSizeMaxTextSize="50dp" |
| app:autoSizeStepGranularity="1px" /> |
| |
| <androidx.appcompat.widget.AppCompatTextView |
| android:id="@+id/textview_linespacing" |
| android:layout_width="100dp" |
| android:layout_height="200dp" |
| app:autoSizeMaxTextSize="20dp" |
| android:text="@string/sample_text1" /> |
| |
| </LinearLayout> |