Created
September 24, 2017 20:39
-
-
Save dharmakshetri/5a9b42da8a02f727153a884c6a2e5538 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="co.prandroid.autosizingtextview.MainActivity"> | |
<TextView | |
android:id="@+id/textview" | |
android:layout_width="match_parent" | |
android:layout_height="20dp" | |
android:textSize="12sp" | |
android:text="Hello World!,This is PrAndroid" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
android:autoSizeTextType="uniform" | |
android:autoSizeMinTextSize="12sp" | |
android:autoSizeMaxTextSize="100sp" | |
android:autoSizeStepGranularity="2sp" | |
app:layout_constraintTop_toTopOf="parent" | |
app:layout_constraintHorizontal_bias="0.0" | |
app:layout_constraintVertical_bias="0.038" | |
android:layout_marginTop="8dp" /> | |
<TextView | |
android:id="@+id/textview1" | |
android:layout_width="match_parent" | |
android:layout_height="50dp" | |
android:textSize="24sp" | |
android:text="Hello World!,This is PrAndroid" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
android:autoSizeTextType="uniform" | |
android:autoSizeMinTextSize="12sp" | |
android:autoSizeMaxTextSize="100sp" | |
android:autoSizeStepGranularity="2sp" | |
app:layout_constraintHorizontal_bias="0.0" | |
app:layout_constraintVertical_bias="0.0" | |
android:layout_marginTop="8dp" | |
app:layout_constraintTop_toBottomOf="@+id/textview" /> | |
<TextView | |
android:id="@+id/textview2" | |
android:layout_width="match_parent" | |
android:layout_height="120dp" | |
android:textSize="36sp" | |
android:text="Hello World!,This is PrAndroid" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
android:autoSizeTextType="uniform" | |
android:autoSizePresetSizes="@array/autosize_text_sizes" | |
app:layout_constraintHorizontal_bias="0.0" | |
app:layout_constraintVertical_bias="0.046" | |
android:layout_marginTop="8dp" | |
app:layout_constraintTop_toBottomOf="@+id/textview1" /> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
tools:ignore="MissingConstraints" | |
android:layout_marginTop="8dp" | |
app:layout_constraintTop_toBottomOf="@+id/textview2"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="140dp" | |
android:textSize="40sp" | |
android:background="@mipmap/ic_launcher_foreground" | |
android:text="Hello World!,This is PrAndroid" | |
android:autoSizeTextType="uniform" | |
android:autoSizePresetSizes="@array/autosize_text_sizes" /> | |
</LinearLayout> | |
</android.support.constraint.ConstraintLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment