Return to Video

Today Item on Tablet - Developing Android Apps

  • 0:00 - 0:03
    In the MainActivity,
    we tell the forecast fragment
  • 0:03 - 0:06
    to use a special today layout
    if it's one pane mode.
  • 0:06 - 0:08
    In the fragment,
    we pass on this value
  • 0:08 - 0:10
    to the forecast adapter,
    if it's not null.
  • 0:10 - 0:13
    The reason it could be null,
    is because the activity onCreate method
  • 0:13 - 0:16
    will happen before the fragment
    onCreate view method.
  • 0:16 - 0:19
    And this is where
    the forecast adapter is initialized.
  • 0:19 - 0:21
    So we set the Boolean here as well.
  • 0:21 - 0:24
    The reason we have this code here
    is because it's a public method.
  • 0:24 - 0:28
    So, in the future it could be called
    before or after this method.
Title:
Today Item on Tablet - Developing Android Apps
Description:

more » « less
Video Language:
English
Team:
Udacity
Project:
UD853 - Developing Android Apps
Duration:
0:28

English subtitles

Revisions Compare revisions