How to make textAlignment under TextView visible in Android Studio 3.1.2 in the attributes?

10.2k views Asked by At

I'm following an online tutorial about Android Studio. But in the video clip, the instructor use textAlignment which is under textAppearance which is under textView under Attributes. In Design View. I looked on the developer website but couldn't find the answer. In my Android Studio 3.1.2, it stops with textStyle (B,I,Tt). I would like to add this function to my attributes.

Screenshot from instructor video

enter image description here

3

There are 3 answers

0
Gastón Saillén On

You should use your Text tab instead of the Design one; it's better to learn XML through code than visual design.

You can still use the attribute textAlignment in your Text.

Just do this, select Text to go to the code editor.

enter image description here

and then just add the attribute to your textview.

enter image description here

You can select any alignment you want.

3
Caner SAYGIN On

You can not, there is no option for it but you can handle this by using "View All Attributes" -> "gravity". Click the text and then click the "View All Attributes" at the bottom of the options sidebar.

View All Attributes

Then look for "gravity" or search. Then pick the options you want.

gravity

0
musicinmusic On

You can make any attribute your 'favorite' which will make them visible in the fewer attributes section

enter image description here