Contenu connexe
Similaire à View andlayout
Similaire à View andlayout (20)
Plus de YAMANE Toshiaki (20)
View andlayout
- 2. Activity
• Activity has Views or ViewGroups
• ViewGroup has ViewGroups or Views
• ViewGroup has ViewGroups or Views
• recursive continue
- 3. Layout
• View Widget
• ViewGroup Layout
• Layout res/layout XML
• onCreate setContentView
- 7. View
•
• TextView Button
• width fill parent wrap content
• height wrap content fill parent
- 9. ( )
• View i/f
• Button
- 11. • Toast
• setContentView setOnClickListener
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Toast.makeText(ListenActivity.this,
"button clicked",
Toast.LENGTH_LONG).show();
}});
- 17. • (http://db.tt/HNf3bu)
•