View andlayout
Upcoming SlideShare
Loading in...5
×
 

View andlayout

on

  • 1,074 views

 

Statistics

Views

Total Views
1,074
Views on SlideShare
1,074
Embed Views
0

Actions

Likes
0
Downloads
11
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

View andlayout View andlayout Presentation Transcript

  • UI Widget
  • Activity • Activity has Views or ViewGroups • ViewGroup has ViewGroups or Views • ViewGroup has ViewGroups or Views • recursive continue
  • Layout • View Widget • ViewGroup Layout • Layout res/layout XML • onCreate setContentView
  • View • TextView • EditText • ImageView • Button • ImageButton
  • ViewGroup • LinearLayout • TableLayout • Gallery • TabHost
  • URL • http://bit.ly/91DbG4 • http://bit.ly/8rBLYG • http://bit.ly/d5ieWu
  • View • • TextView Button • width fill parent wrap content • height wrap content fill parent
  • ( ) • View i/f • Button
  • Button • Button button = (Button)findViewById(R.id.button);
  • • Toast • setContentView setOnClickListener button.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { Toast.makeText(ListenActivity.this, "button clicked", Toast.LENGTH_LONG).show(); }});
  • • • • • – Android
  • Dialog • • View
  • Dialog • AlertDialog • DatePickerDialog • ProgressDialog • TimePickerDialog • ZoomDialog
  • Dialog • AlertDialog • http://bit.ly/bghNAh
  • • Menu • onCreateOptionMenu • onPrepareOptionsMenu
  • • (http://db.tt/HNf3bu) •
  • • NotepadTutorial • http://bit.ly/c8jm70