basic

  • what is activity?
    • single screen with a user interface just like window or frame of Java.
    • layout <-> activity
      • => ui logic associate with the ui presentation
    • activity name
    • activity layout (res->layout->activity_main.html)
      • text field
        • android:id=”@+id/edit_message”
          • “+ ” -> define the resource id for the 1st time
          • id is needed only when the widget will be used in activity code
        • android:layout_width and android:layout_height
          • specify size of the widget
        • android:hint
          • default string to display when the field is empty
      • button field
        • android:onClick=”sendMessage”
          • => tell sys to call sendMessage() method when it’s clicked
          • the sendMessage() method need to be defined in the corresponding activity code
            • public
            • void
            • View as the only parameter
    • string resource (res->values->string.xml)
      • specify value of the obj in layout?
  • Intent
    • object provide runtime binding btw. separate component (such as activities)
  • what’s the difference btw. empty ui, setting ui etc.?
  • ui
    • view
      • widget
        • button
        • text field
    • view group
      • layout for view
      • can be recursive
Advertisements
This entry was posted in Android. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s