Return to Video

Creating The UI

  • 0:01 - 0:04
    If you recall when we looked at the
    application, we had three buttons across
  • 0:04 - 0:08
    the top of the screen, and we had
    the map fragment itself underneath them.
  • 0:08 - 0:12
    And the basic UI that Android Studio
    created for us had a single text view.
  • 0:12 - 0:13
    So delete that and
  • 0:13 - 0:16
    replace it with the layout code
    that's in the instructor notes.
  • 0:16 - 0:21
    This is made up of a LinearLayout which
    is set to be in vertical orientation.
  • 0:21 - 0:25
    And within this LinearLayout I then
    have another LinearLayout at the top
  • 0:25 - 0:27
    which contains the three buttons.
  • 0:27 - 0:31
    And as you can see my three buttons
    are Button Map, Button Satellite, and
  • 0:31 - 0:32
    Button Hybrid.
  • 0:32 - 0:36
    And then underneath this LinearLayout
    for the buttons is the fragment itself
  • 0:36 - 0:40
    containing the map fragment similar
    to what we've been doing earlier on.
  • 0:40 - 0:44
    So I have a linear layout putting the
    buttons on top and the map underneath.
  • 0:44 - 0:47
    And then the second linear layout
    within the first has the buttons
  • 0:47 - 0:50
    horizontally stacked side by side,
    as you can see here.
  • 0:50 - 0:53
    So now if I run the application
    you'll see I have the basic map
  • 0:53 - 0:54
    with the three buttons.
  • 0:54 - 0:58
    They won't do anything yet, because I
    haven't written the code behind them.
  • 0:58 - 1:02
    Try it out yourself, see what happens,
    and check your error log for details.
  • 1:02 - 1:06
    Typically if you have problems it's
    the API key hasn't been setup properly.
  • 1:06 - 1:08
    And after we wire up the buttons
    we'll take a look at how to do that.
Tytuł:
Creating The UI
Opis:

more » « less
Video Language:
English
Team:
Udacity
Projekt:
ud876-4 - Google Play Services - Maps
Duration:
01:09
Udacity Robot edited angielski subtitles for Creating The UI
Udacity Robot edited angielski subtitles for Creating The UI
Cogi-Admin edited angielski subtitles for Creating The UI

English subtitles

Revisions Compare revisions