Hello everyone, i am working on android application in which i am showing some text using TextView
with central alignment on the screen. But the problem is that the text is not properly justified on the screen. This is the xml code which i am using for showing text with central alignment on the screen. Please help me for doing this.
<TextView
android:id="@+id/lastMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:layout_gravity="center"
android:text="Mana addd asdwd ekff fec greq crrq grooe cieurnf covhrpw cjcneie ejducbc ueiche deidhe idhcecm ekwp ww"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="12sp" />
This library will provide you a way to justify text.
Compatible for Android 2.2 to 5.X
https://github.com/bluejamesbond/TextJustify-Android