how to justify textview in android studio

In this method, we will tell you that how you can justify any text in seconds by using attribute key value “INTER_WORD”. This is built in feature provided by Android Studio version 3 or above. Here look into following example where we present with how to justify text in TextView through layout file and programmatically by using “inter_word”. To justify text in TextView through layout file, add the following attribute key : value ( android:justificationMode="inter_word") to the TextView. example

                <TextView
                android:id="@+id/composition_tv"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fontFamily="@font/sintony"
                android:textColor="@color/black"
                android:justificationMode="inter_word"
                android:visibility="gone"
                android:textStyle="normal" />

Post a Comment

Thank you

Previous Post Next Post