I have the new Version of Android Studio (3.1.4), but I can't find textAlignment. I've already searched in "View all Attributes". Do somebody now where I can find it.
Thanks for answering!
I have the new Version of Android Studio (3.1.4), but I can't find textAlignment. I've already searched in "View all Attributes". Do somebody now where I can find it.
Thanks for answering!
Here's how I resolved the problem (on Android Studio 3.3 - Build #AI-182.5107.16.33.5199772, built on December 25, 2018):
Note: I had the same problem and I noticed that the TEXT_ALIGNMENT constants were only introduced in API level 17 (see https://developer.android.com/reference/android/view/View).
Let me know if this helps.
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 for me. At the exact same place, where it has been in previous versions.
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"
Maybe rebuilding the project or cleaning it will help you , it's available to me and i am using the below mentioned version of studio
Android Studio 3.2.1 Build #AI-181.5540.7.32.5056338, built on October 9, 2018 JRE: 1.8.0_152-release-1136-b06 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0
Changing the minSdkVersion to 17 worked for me. (Android Studio version 3.3.1)
you need to use gravity-->center in all attribute pane for text alignment in newer version of android studio
I am using android studio 4.2.2 and changing the sdk to 17 did bring the setting back as suggested above but changing the gravity to right and left also works similar to the text allignment.