4

Before closing this question as a duplicate of this one, please note the other post never got an acceptable answer.

Here's a screenshot of what it looked like before, according to the Google Codelabs tutorials

enter image description here

I can't find this attribute (even in the expanded list). Was it removed? If so, what's an acceptable replacement for it? Since I'm relatively new to Android programming, I'm not too comfortable with editing XML directly to mimic the functionality of textAlignment.

AlexH
  • 1,087
  • 2
  • 10
  • 29

2 Answers2

1

I currently use Android Studio 3.2.1 (Build #AI-181.5540.7.32.5056338, built on October 9, 2018) and it is still there. At the exact same place as in your screenshot. So, it should be there.

If you can't find it for some reason, there is still the possibility to write it manually within the properties of your TextView in the XML file with the following (changing "textStart" to the value you want):

android:textAlignment="textStart"

You wrote, that you are not comfortable with editing the XML directly, but you would basically just have to copy the above line to the TextView. You don't need to be worried about it, if it doesn't work out the way, you want to, you can still return to how it was before you modified the XML file.

Geshode
  • 3,600
  • 6
  • 18
  • 32
  • Thanks! I'll give this a try tomorrow morning and let you know. If it works, I'll accept your answer. – AlexH Oct 29 '18 at 02:02
  • 1
    This worked. Strange that it doesn't appear in the attributes pane. Thanks again! – AlexH Oct 29 '18 at 09:45
0

Nope, it is still there in Android Studio 3.2.1.* If you can't see it still (it is in the same location as your screenshot BTW) then try using the 'Search' feature in the 'Attributes' section. If you still can't find it try adding it manually through the 'Text' tab** with this line

android:textAlignment = "(whatever you want)

  • 3
    I tried searching for it as well, but it's definitely not there on my end :/ – AlexH Oct 29 '18 at 09:43
  • It is because the min SDK API has to be 17 instead of 15. – grouser Feb 25 '19 at 21:06
  • I think Im on API 30 and I cant find it. Googling in all sorts of places doesnt explain and I know I could read the release notes but hey, youd think itd be revealed somewhere in a search. – Paula Livingstone Aug 15 '20 at 10:39