Created
February 6, 2019 17:47
-
-
Save tfcporciuncula/fe4d8c6b04ac77e85964face89835b1e to your computer and use it in GitHub Desktop.
Autosizing and ellipsize
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"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<TextView | |
android:id="@+id/textView" | |
android:layout_width="200dp" | |
android:layout_height="100dp" | |
android:layout_gravity="center" | |
android:background="@color/colorAccent" | |
android:ellipsize="end" | |
android:text="@string/long_sentence" | |
android:textColor="@android:color/white" | |
app:autoSizeMaxTextSize="60dp" | |
app:autoSizeMinTextSize="40dp" | |
app:autoSizeTextType="uniform" /> | |
</FrameLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment