How to set Word wrap in label in Xamarin Android (native)?

Viewed 71

I have tried the below code for wrap the text inside the treeview in native android. But it doesn't work. Have anyone know how to wrap the text in label.

        android:ellipsize="end" 
        android:width="0dip" 
        android:maxLines="2" 

could you please tell me how to wrap the text?

1 Answers

This line of code seems to be wrong:

android:width="0dip" 

Maybe you wanted to fix the width using the layout_width attribute. Instead of

android:ellipsize="end" 
android:width="0dip" 
android:maxLines="2" 

do this

android:ellipsize="end" 
android:layout_width="0dip" 
android:maxLines="2"
Related