SlideShare une entreprise Scribd logo
1  sur  32
Understanding Layouts in Android
Layouts

• Your layout is the architecture for the user interface in an
  Activity. It defines the layout structure and holds all the
  elements that appear to the user.
• Declare UI elements in XML
• Instantiate layout elements at runtime
Layouts

• These are the following:

1.     Linear Layout
2.     Relative Layout
3.     Table Layout
4.     Grid View
5.     List View
Linear Layouts

• A Layout that arranges its children in a single column or a
  single row
• Can be either vertical or horizontal.
Linear Layout - Vertical
          XML              Emulator
Linear Layout - Horizontal
         XML                 Emulator
Relative Layout

• Relative Layout is a view group that displays child views in relative
  positions
• The position of each view can be specified as relative to sibling elements
Relative Layout
         XML      Graphical Representation
Table Layout

• A layout that arranges its children into rows and columns
• A TableLayout consists of a number of TableRow objects,
  each defining a row
Table Layout
         XML   Graphical Representation
Grid View

• GridView is a ViewGroup that displays items in a two-dimensional,
  scrollable grid
Grid View
        XML   Graphical Representation
List View

• ListView is a view group that displays a list of scrollable items.
• The list items are automatically inserted to the list using
  an Adapter
List View
            XML   Graphical Representation
Widgets in Android
Toggle Button

• A toggle button allows the user to change a setting between
  two states
              XML                              Emulator
Check Boxes


• Checkboxes allow the user to select one or more options from
  a set.
• You should present each checkbox option in a vertical list
Radio Buttons


• Radio buttons allow the user to select one option from a set.
• Use radio buttons for optional sets that are mutually
  exclusive
Check Box and Radio Buttons
   Check Box                  Radio Group
   Radio Button
Check Box, Radio Buttons and Radio Group
Spinners
• Spinners provide a quick way to select one value from a set
• In the default state, a spinner shows its currently selected value

               XML                                  Java Code
Spinners
           Emulator
Autocomplete Textview

• An editable text view that shows completion suggestions
  automatically while the user is typing.
• The drop down can be dismissed at any time by pressing the
  back key or, if no item is selected in the drop down, by
  pressing the enter/dpad center key.
Autocomplete Text View
         XML             Emulator
Date Picker

• This class is a widget for selecting a date
• The date can be selected by a year, month,
  and day spinners.
Date Picker
         XML   Graphical Representation
Time Picker

• A view for selecting the time of day, in either
  24 hour or AM/PM mode
• The hour can be entered by keyboard input
• The minutes can be entered by entering single
  digits.
Time Picker
         XML   Graphical Representation
Web Views

• A View that displays web pages
• you can roll your own web browser or simply display some
  online content within your Activity.
• <uses-permission
  android:name="android.permission.INTERNET" />
Web Views
       XML   Graphical Representation
•Q & A..?
Android webinar class_2

Contenu connexe

En vedette

Android webinar class_3
Android webinar class_3Android webinar class_3
Android webinar class_3Edureka!
 
Android webinar class_4
Android webinar class_4Android webinar class_4
Android webinar class_4Edureka!
 
Android webinar class_5
Android webinar class_5Android webinar class_5
Android webinar class_5Edureka!
 
Learn Android at edureka!
Learn Android at edureka! Learn Android at edureka!
Learn Android at edureka! Edureka!
 
Learn Big Data & Hadoop
Learn Big Data & Hadoop Learn Big Data & Hadoop
Learn Big Data & Hadoop Edureka!
 
Learn Business Analytics with R at edureka!
Learn Business Analytics with R at edureka!Learn Business Analytics with R at edureka!
Learn Business Analytics with R at edureka!Edureka!
 
Learn Cassandra at edureka!
Learn Cassandra at edureka!Learn Cassandra at edureka!
Learn Cassandra at edureka!Edureka!
 
Java class 6
Java class 6Java class 6
Java class 6Edureka!
 
Java class 3
Java class 3Java class 3
Java class 3Edureka!
 
Java class 7
Java class 7Java class 7
Java class 7Edureka!
 
Learn Hadoop
Learn HadoopLearn Hadoop
Learn HadoopEdureka!
 
Hadoop Adminstration with Latest Release (2.0)
Hadoop Adminstration with Latest Release (2.0)Hadoop Adminstration with Latest Release (2.0)
Hadoop Adminstration with Latest Release (2.0)Edureka!
 
Android webinar class_1
Android webinar class_1Android webinar class_1
Android webinar class_1Edureka!
 
Android webinar class_6
Android webinar class_6Android webinar class_6
Android webinar class_6Edureka!
 
Java class 5
Java class 5Java class 5
Java class 5Edureka!
 
Java class 1
Java class 1Java class 1
Java class 1Edureka!
 
Java class 4
Java class 4Java class 4
Java class 4Edureka!
 
Bulk Loading Into HBase With MapReduce
Bulk Loading Into HBase With MapReduceBulk Loading Into HBase With MapReduce
Bulk Loading Into HBase With MapReduceEdureka!
 
Learn Hadoop Administration
Learn Hadoop AdministrationLearn Hadoop Administration
Learn Hadoop AdministrationEdureka!
 
Build Application With MongoDB
Build Application With MongoDBBuild Application With MongoDB
Build Application With MongoDBEdureka!
 

En vedette (20)

Android webinar class_3
Android webinar class_3Android webinar class_3
Android webinar class_3
 
Android webinar class_4
Android webinar class_4Android webinar class_4
Android webinar class_4
 
Android webinar class_5
Android webinar class_5Android webinar class_5
Android webinar class_5
 
Learn Android at edureka!
Learn Android at edureka! Learn Android at edureka!
Learn Android at edureka!
 
Learn Big Data & Hadoop
Learn Big Data & Hadoop Learn Big Data & Hadoop
Learn Big Data & Hadoop
 
Learn Business Analytics with R at edureka!
Learn Business Analytics with R at edureka!Learn Business Analytics with R at edureka!
Learn Business Analytics with R at edureka!
 
Learn Cassandra at edureka!
Learn Cassandra at edureka!Learn Cassandra at edureka!
Learn Cassandra at edureka!
 
Java class 6
Java class 6Java class 6
Java class 6
 
Java class 3
Java class 3Java class 3
Java class 3
 
Java class 7
Java class 7Java class 7
Java class 7
 
Learn Hadoop
Learn HadoopLearn Hadoop
Learn Hadoop
 
Hadoop Adminstration with Latest Release (2.0)
Hadoop Adminstration with Latest Release (2.0)Hadoop Adminstration with Latest Release (2.0)
Hadoop Adminstration with Latest Release (2.0)
 
Android webinar class_1
Android webinar class_1Android webinar class_1
Android webinar class_1
 
Android webinar class_6
Android webinar class_6Android webinar class_6
Android webinar class_6
 
Java class 5
Java class 5Java class 5
Java class 5
 
Java class 1
Java class 1Java class 1
Java class 1
 
Java class 4
Java class 4Java class 4
Java class 4
 
Bulk Loading Into HBase With MapReduce
Bulk Loading Into HBase With MapReduceBulk Loading Into HBase With MapReduce
Bulk Loading Into HBase With MapReduce
 
Learn Hadoop Administration
Learn Hadoop AdministrationLearn Hadoop Administration
Learn Hadoop Administration
 
Build Application With MongoDB
Build Application With MongoDBBuild Application With MongoDB
Build Application With MongoDB
 

Similaire à Android webinar class_2

Basics of expression blend4
Basics of expression blend4Basics of expression blend4
Basics of expression blend4Samson Tennela
 
Apple Watch Human Interface Guidelines
Apple Watch Human Interface GuidelinesApple Watch Human Interface Guidelines
Apple Watch Human Interface GuidelinesShengWen Chiou
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE IntroductionAhllen Javier
 
Visual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfVisual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfsheenmarie0212
 
Combo box and List box in VB.Net.ppt
Combo box and List box in VB.Net.pptCombo box and List box in VB.Net.ppt
Combo box and List box in VB.Net.pptUjwala Junghare
 
Unit 2 - Object Navigator, Repository and ABAP Programs
Unit 2 - Object Navigator, Repository and ABAP ProgramsUnit 2 - Object Navigator, Repository and ABAP Programs
Unit 2 - Object Navigator, Repository and ABAP Programsdubon07
 
the Modeling is a way of thinking about the
the Modeling is a way of thinking about thethe Modeling is a way of thinking about the
the Modeling is a way of thinking about thesaman zaker
 
Android android layouts
Android android layoutsAndroid android layouts
Android android layoutsperpetrotech
 
Android and IOS UI Development (Android 5.0 and iOS 9.0)
Android and IOS UI Development (Android 5.0 and iOS 9.0)Android and IOS UI Development (Android 5.0 and iOS 9.0)
Android and IOS UI Development (Android 5.0 and iOS 9.0)Michael Shrove
 
APP CAMP #2.
APP CAMP #2.APP CAMP #2.
APP CAMP #2.Othaimeen
 
Crystal tr///SAP Design Studio online training by design studio Export-24/7//...
Crystal tr///SAP Design Studio online training by design studio Export-24/7//...Crystal tr///SAP Design Studio online training by design studio Export-24/7//...
Crystal tr///SAP Design Studio online training by design studio Export-24/7//...venkat training
 
Siebel Open UI Presentation
Siebel Open UI PresentationSiebel Open UI Presentation
Siebel Open UI PresentationAjeeth Pingle
 

Similaire à Android webinar class_2 (20)

Ui 5
Ui   5Ui   5
Ui 5
 
Basics of expression blend4
Basics of expression blend4Basics of expression blend4
Basics of expression blend4
 
Apple Watch Human Interface Guidelines
Apple Watch Human Interface GuidelinesApple Watch Human Interface Guidelines
Apple Watch Human Interface Guidelines
 
Odoo views
Odoo viewsOdoo views
Odoo views
 
Visual Basic.pptx
Visual Basic.pptxVisual Basic.pptx
Visual Basic.pptx
 
Visual basic
Visual basicVisual basic
Visual basic
 
Unit2
Unit2Unit2
Unit2
 
Visual Basic IDE Introduction
Visual Basic IDE IntroductionVisual Basic IDE Introduction
Visual Basic IDE Introduction
 
Visual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdfVisual Basic IDE Intro.pdf
Visual Basic IDE Intro.pdf
 
xaml overview
xaml overviewxaml overview
xaml overview
 
Combo box and List box in VB.Net.ppt
Combo box and List box in VB.Net.pptCombo box and List box in VB.Net.ppt
Combo box and List box in VB.Net.ppt
 
Unit 2 - Object Navigator, Repository and ABAP Programs
Unit 2 - Object Navigator, Repository and ABAP ProgramsUnit 2 - Object Navigator, Repository and ABAP Programs
Unit 2 - Object Navigator, Repository and ABAP Programs
 
the Modeling is a way of thinking about the
the Modeling is a way of thinking about thethe Modeling is a way of thinking about the
the Modeling is a way of thinking about the
 
Android android layouts
Android android layoutsAndroid android layouts
Android android layouts
 
Android and IOS UI Development (Android 5.0 and iOS 9.0)
Android and IOS UI Development (Android 5.0 and iOS 9.0)Android and IOS UI Development (Android 5.0 and iOS 9.0)
Android and IOS UI Development (Android 5.0 and iOS 9.0)
 
Asp.net controls
Asp.net controlsAsp.net controls
Asp.net controls
 
Visual studio Toolkits
Visual studio ToolkitsVisual studio Toolkits
Visual studio Toolkits
 
APP CAMP #2.
APP CAMP #2.APP CAMP #2.
APP CAMP #2.
 
Crystal tr///SAP Design Studio online training by design studio Export-24/7//...
Crystal tr///SAP Design Studio online training by design studio Export-24/7//...Crystal tr///SAP Design Studio online training by design studio Export-24/7//...
Crystal tr///SAP Design Studio online training by design studio Export-24/7//...
 
Siebel Open UI Presentation
Siebel Open UI PresentationSiebel Open UI Presentation
Siebel Open UI Presentation
 

Plus de Edureka!

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaEdureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaEdureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaEdureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaEdureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaEdureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaEdureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaEdureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaEdureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaEdureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaEdureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | EdurekaEdureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEdureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEdureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaEdureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaEdureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaEdureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaEdureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaEdureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | EdurekaEdureka!
 

Plus de Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
 

Android webinar class_2

  • 2. Layouts • Your layout is the architecture for the user interface in an Activity. It defines the layout structure and holds all the elements that appear to the user. • Declare UI elements in XML • Instantiate layout elements at runtime
  • 3. Layouts • These are the following: 1. Linear Layout 2. Relative Layout 3. Table Layout 4. Grid View 5. List View
  • 4. Linear Layouts • A Layout that arranges its children in a single column or a single row • Can be either vertical or horizontal.
  • 5. Linear Layout - Vertical XML Emulator
  • 6. Linear Layout - Horizontal XML Emulator
  • 7. Relative Layout • Relative Layout is a view group that displays child views in relative positions • The position of each view can be specified as relative to sibling elements
  • 8. Relative Layout XML Graphical Representation
  • 9. Table Layout • A layout that arranges its children into rows and columns • A TableLayout consists of a number of TableRow objects, each defining a row
  • 10. Table Layout XML Graphical Representation
  • 11. Grid View • GridView is a ViewGroup that displays items in a two-dimensional, scrollable grid
  • 12. Grid View XML Graphical Representation
  • 13. List View • ListView is a view group that displays a list of scrollable items. • The list items are automatically inserted to the list using an Adapter
  • 14. List View XML Graphical Representation
  • 16. Toggle Button • A toggle button allows the user to change a setting between two states XML Emulator
  • 17. Check Boxes • Checkboxes allow the user to select one or more options from a set. • You should present each checkbox option in a vertical list
  • 18. Radio Buttons • Radio buttons allow the user to select one option from a set. • Use radio buttons for optional sets that are mutually exclusive
  • 19. Check Box and Radio Buttons Check Box Radio Group Radio Button
  • 20. Check Box, Radio Buttons and Radio Group
  • 21. Spinners • Spinners provide a quick way to select one value from a set • In the default state, a spinner shows its currently selected value XML Java Code
  • 22. Spinners Emulator
  • 23. Autocomplete Textview • An editable text view that shows completion suggestions automatically while the user is typing. • The drop down can be dismissed at any time by pressing the back key or, if no item is selected in the drop down, by pressing the enter/dpad center key.
  • 24. Autocomplete Text View XML Emulator
  • 25. Date Picker • This class is a widget for selecting a date • The date can be selected by a year, month, and day spinners.
  • 26. Date Picker XML Graphical Representation
  • 27. Time Picker • A view for selecting the time of day, in either 24 hour or AM/PM mode • The hour can be entered by keyboard input • The minutes can be entered by entering single digits.
  • 28. Time Picker XML Graphical Representation
  • 29. Web Views • A View that displays web pages • you can roll your own web browser or simply display some online content within your Activity. • <uses-permission android:name="android.permission.INTERNET" />
  • 30. Web Views XML Graphical Representation

Notes de l'éditeur

  1. such as development toolkits for other programming languages, and can write and contribute their own plug-in modules.
  2. Java compilers convert your code from human readable Java source files to something called “bytecode” in the Java world. “Bytecode” is interpreted by a JVM, which operates much like a physical CPU might operate on machine code, to actually execute the compiled code. Performance - Java performance in generally second only to C/C++ in common language performance comparisons. In the Java programming language and environment, a just-in-time (JIT) compiler is a program that turns Java bytecode (a program that contains instructions that must be interpreted) into instructions that can be sent directly to the processor.The just-in-time compiler comes with the virtual machine and is used optionally. It compiles the bytecode into platform-specific executable code that is immediately executed
  3. Java compilers convert your code from human readable Java source files to something called “bytecode” in the Java world. “Bytecode” is interpreted by a JVM, which operates much like a physical CPU might operate on machine code, to actually execute the compiled code. Performance - Java performance in generally second only to C/C++ in common language performance comparisons. In the Java programming language and environment, a just-in-time (JIT) compiler is a program that turns Java bytecode (a program that contains instructions that must be interpreted) into instructions that can be sent directly to the processor.The just-in-time compiler comes with the virtual machine and is used optionally. It compiles the bytecode into platform-specific executable code that is immediately executed
  4. such as development toolkits for other programming languages, and can write and contribute their own plug-in modules.