SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
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

Contenu connexe

Similaire à View andlayout

Android development - the basics, MFF UK, 2013
Android development - the basics, MFF UK, 2013Android development - the basics, MFF UK, 2013
Android development - the basics, MFF UK, 2013Tomáš Kypta
 
Easy javascript
Easy javascriptEasy javascript
Easy javascriptBui Kiet
 
ICS ホットトピック
ICS ホットトピックICS ホットトピック
ICS ホットトピックMakoto Yamazaki
 
Solving the Workflow - Building MODX.today with Gitify (2015-05-21, Alkmaar)
Solving the Workflow - Building MODX.today with Gitify (2015-05-21, Alkmaar)Solving the Workflow - Building MODX.today with Gitify (2015-05-21, Alkmaar)
Solving the Workflow - Building MODX.today with Gitify (2015-05-21, Alkmaar)Mark Hamstra
 
Learn javascript easy steps
Learn javascript easy stepsLearn javascript easy steps
Learn javascript easy stepsprince Loffar
 
Custom Editor Unity
Custom Editor UnityCustom Editor Unity
Custom Editor UnityDat Pham
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitColin Su
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptxtnscharishma
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can buildMonika Piotrowicz
 
Google I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb HighlightsGoogle I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb HighlightsRomain Guy
 
Untangling spring week5
Untangling spring week5Untangling spring week5
Untangling spring week5Derek Jacoby
 
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client TechnologyRed Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client TechnologyMark Proctor
 
Google web toolkit web conference presenation
Google web toolkit web conference presenationGoogle web toolkit web conference presenation
Google web toolkit web conference presenationStephen Erdman
 
Ch4 creating user interfaces
Ch4 creating user interfacesCh4 creating user interfaces
Ch4 creating user interfacesShih-Hsiang Lin
 
Untangling spring week6
Untangling spring week6Untangling spring week6
Untangling spring week6Derek Jacoby
 

Similaire à View andlayout (20)

Android development - the basics, MFF UK, 2013
Android development - the basics, MFF UK, 2013Android development - the basics, MFF UK, 2013
Android development - the basics, MFF UK, 2013
 
Easy javascript
Easy javascriptEasy javascript
Easy javascript
 
ICS ホットトピック
ICS ホットトピックICS ホットトピック
ICS ホットトピック
 
Solving the Workflow - Building MODX.today with Gitify (2015-05-21, Alkmaar)
Solving the Workflow - Building MODX.today with Gitify (2015-05-21, Alkmaar)Solving the Workflow - Building MODX.today with Gitify (2015-05-21, Alkmaar)
Solving the Workflow - Building MODX.today with Gitify (2015-05-21, Alkmaar)
 
Learn javascript easy steps
Learn javascript easy stepsLearn javascript easy steps
Learn javascript easy steps
 
Git hub
Git hubGit hub
Git hub
 
Custom Editor Unity
Custom Editor UnityCustom Editor Unity
Custom Editor Unity
 
Javascript libraries
Javascript librariesJavascript libraries
Javascript libraries
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptx
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can build
 
Git
GitGit
Git
 
Selenium再入門
Selenium再入門Selenium再入門
Selenium再入門
 
Google I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb HighlightsGoogle I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb Highlights
 
Untangling spring week5
Untangling spring week5Untangling spring week5
Untangling spring week5
 
System browser
System browserSystem browser
System browser
 
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client TechnologyRed Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
Red Hat JBoss BRMS and BPMS Workbench and Rich Client Technology
 
Google web toolkit web conference presenation
Google web toolkit web conference presenationGoogle web toolkit web conference presenation
Google web toolkit web conference presenation
 
Ch4 creating user interfaces
Ch4 creating user interfacesCh4 creating user interfaces
Ch4 creating user interfaces
 
Untangling spring week6
Untangling spring week6Untangling spring week6
Untangling spring week6
 

Plus de YAMANE Toshiaki (20)

読書会開催提案
読書会開催提案読書会開催提案
読書会開催提案
 
Lambda ECS Worker Pattern
Lambda ECS Worker PatternLambda ECS Worker Pattern
Lambda ECS Worker Pattern
 
Okinawa makers
Okinawa makersOkinawa makers
Okinawa makers
 
Geek な Recipe の共有
Geek な Recipe の共有Geek な Recipe の共有
Geek な Recipe の共有
 
Git Workshop 20130720
Git Workshop 20130720Git Workshop 20130720
Git Workshop 20130720
 
Designers hack
Designers hackDesigners hack
Designers hack
 
底辺部な勉強会へのお誘い
底辺部な勉強会へのお誘い底辺部な勉強会へのお誘い
底辺部な勉強会へのお誘い
 
2012.10.27 のアンカンファレンスのスライド
2012.10.27 のアンカンファレンスのスライド2012.10.27 のアンカンファレンスのスライド
2012.10.27 のアンカンファレンスのスライド
 
Coderetreat
CoderetreatCoderetreat
Coderetreat
 
Make androidproject.2
Make androidproject.2Make androidproject.2
Make androidproject.2
 
Hello world
Hello worldHello world
Hello world
 
Android Fundamentals
Android FundamentalsAndroid Fundamentals
Android Fundamentals
 
ojag20120519
ojag20120519ojag20120519
ojag20120519
 
20120512
2012051220120512
20120512
 
X hago3
X hago3X hago3
X hago3
 
20110205.jsonengine
20110205.jsonengine20110205.jsonengine
20110205.jsonengine
 
20110205.apple1emu
20110205.apple1emu20110205.apple1emu
20110205.apple1emu
 
20110205.linux 0.01
20110205.linux 0.0120110205.linux 0.01
20110205.linux 0.01
 
20110205.conference
20110205.conference20110205.conference
20110205.conference
 
Introduction ofintent
Introduction ofintentIntroduction ofintent
Introduction ofintent
 

View andlayout