9

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

Geoffrey
  • 5,407
  • 10
  • 43
  • 78
user3116015
  • 91
  • 1
  • 1
  • 3

3 Answers3

14

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

Caner SAYGIN
  • 527
  • 3
  • 11
  • Thanks. Please is there a way to move the 'gravity' attribute into list of favorites attribute for faster reach ? – Israel Obanijesu Aug 22 '19 at 18:52
  • 1
    You are welcome Israel. Actually, i have no idea about attribute shortcuts. I made a search on google but i could not find anything useful. – Caner SAYGIN Aug 31 '19 at 02:52
  • 2
    Oh, i figured it out eventually. If you hover on each attribute, there is a star icon that shows up at the left side, click on the star icon and it will be added to list of fewer attributes in the 'favorite' section – Israel Obanijesu Sep 01 '19 at 13:54
0

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.

karel
  • 5,489
  • 46
  • 45
  • 50
Gastón Saillén
  • 12,319
  • 5
  • 67
  • 77
0

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

enter image description here

musicinmusic
  • 247
  • 1
  • 11