1. Are you ready for the Galaxy S20? Here is everything we know so far!

Absolute Beginner Android Studio Codelabs

Discussion in 'Android Development' started by Billaboard, Dec 6, 2018.

  1. Billaboard

    Billaboard Lurker
    Thread Starter

    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.
     


  2. Deleted User

    Deleted User Guest

    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
     
    GameTheory likes this.
  3. Billaboard

    Billaboard Lurker
    Thread Starter

    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.
     
  4. Deleted User

    Deleted User Guest

    Here's a screenshot of my Attribute view for TextView.
    Post a screenshot of what you see.


    atrributes_textview.png
     
  5. Billaboard

    Billaboard Lurker
    Thread Starter

    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
     
  6. Deleted User

    Deleted User Guest

  7. Billaboard

    Billaboard Lurker
    Thread Starter

    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.
     
    kasperjohnallenjr likes this.
Loading...
Similar Threads - Absolute Beginner Android
  1. PDX_Dragon
    Replies:
    0
    Views:
    477
  2. Trazy J Dozier
    Replies:
    13
    Views:
    2,355
  3. App Update
    Replies:
    0
    Views:
    81
  4. Tressie6
    Replies:
    2
    Views:
    511
  5. kamnkian
    Replies:
    4
    Views:
    730
  6. That_Stoney
    Replies:
    5
    Views:
    401
  7. Yohan Irani
    Replies:
    0
    Views:
    533
  8. TrinityAbsher666
    Replies:
    1
    Views:
    2,757
  9. Emmanuel Godwin
    Replies:
    24
    Views:
    2,937
  10. Billaboard
    Replies:
    6
    Views:
    1,191

Share This Page

Loading...