• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Absolute Beginner Android Studio Codelabs

I am still struggling with the very first Codelabs session, I'm afraid.

There is an instruction relating to a very simple TextView that states:
  1. Set the textStyle to B (bold) and the textAlignment to ALIGNCENTER (center the paragraph)
But I can find nowhere to set textAlignment to anything.

If I center the text by using "gravity". the Design graphic centers the text, but the Blueprint graphic has the text left justified.

Is this right, or am I missing something obvious?

The app does appear to work, though. but I would like to understand what is going on.
 
So did you click on the link to view all attributes, including textAlignment, as explained in your previous thread here?

It's the link at the bottom of this screen. Clicking that will show all available attributes for the UI component you selected.


attributes.png
 
Well, yes. I've spent ages looking through all the attributes over several passes and installation on a couple of machines. Using version 3.2.1 of the program.

At the top of "All Attributes", there are text, textColor, textSize and textStyle. Then, in the alphabetical list below, there are textAllCaps, then textColorHighlight and others further along the alphabet, but no textAlignment.

The course illustration shows a set of selectable graphics as the alignment selector, but I can't see this either.

The gravity setting seems to do the job, but there is this weird thing where the two displays show the text in different places.
 
Here's a screenshot of my Attribute view for TextView.
Post a screenshot of what you see.


atrributes_textview.png
 
Here is what I see. First, the upper, presumably list of Attributes for textView, then the lower alphabetical list. I'll also post a shot of the displaced text

.
AS1.jpg
AS2.JPG


AS3.JPG
 
Many thanks for that. It now works fine and the two images have also come into sync. It does seem odd that some people have the problem and others don't, but I presume this is an expected "feature" of beta software.

I must make some effort to find my way around StackOverflow.

Thanks again for the help.
 
Back
Top Bottom