TagView
TagView copied to clipboard
How can we show the text in two lines?
Hello there; I want to show a text consisting of two lines within a label. \ n or html text does not work. Best regards.
That's because there is a tag setted for singleLine... If you want a quick solution, make a copy of this layout on this project and delete that propperty.
I did not understand what you said. I'm using Android Studio and Gradle.
In Android Studio, create a new layout resource file. name it "tagview_item.xml"
Inside paste this code as it is:
` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_vertical" android:orientation="horizontal" >
<TextView
android:id="@+id/tv_tag_item_contain"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" />
<TextView
android:id="@+id/tv_tag_item_delete"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:visibility="gone"/>
</LinearLayout>`
Above solution works only if you add the library manually in your project instead of Gradle.