任意の長さの文字列をいい感じに省略して 表示することはよくあるかと思います。 そんな時にいい感じに表示する方法です。
方法
<TextView android:layout_height="wrap_content" android:layout_margin="12dp" android:ellipsize="end" android:maxLines="2" tools:text="雑な文字列雑な文字列雑な文字列雑な文字列雑な文字列雑な文字列雑な文字列雑な文字列雑な文字列雑な文字列雑な文字列雑な文字列雑な文字列雑な文字列雑な文字列雑な文字列" />