SlideShare ist ein Scribd-Unternehmen logo
1 von 52
Downloaden Sie, um offline zu lesen
Android
Graphical User Interface
Agenda
Familiarize with the main types of GUI components
Layouts
Basic Widgets
Others
Menus
Using Menus
Menus is not consuming ‘much’ view space.
Android provides two types of menu known
as: options menu and context menu.
 The options menu is triggered by pressing the
hardware Menu button on the device, while
 The context menu is raised by a tap-and-hold on
the widget associated to the menu.
Using Menus
Example: Using an option menu
Options
available in
this context
Press Menu
Button
A max of six entries per
menu. Excess will be
displayed as part of the
More option
Example: Using an option menu
Available
Options in
this
context
Press Menu
button
Using Menus
Example :
Dealing with SMS
(text-messages)
by using the built-
in Messaging
app’s
context menu
Tap-&-Hold
Using Menus
Option and Context Menus may include:
1. Text
2. Icons
3. Radio Buttons
4. Check Boxes
5. Sub-menus
6. Short-cut keys
Example 1: Option Menu
Example 1: Option Menu
Example 1: Context Menu
Example 1: Using Option and Context Menu
The app shows two text boxes. Menus are used to change text’s size, color, and
style.
Example 1: Using Option and Context Menu
The app shows two text boxes. Menus are used to change text’s size, color, and style.
Example 1: Using Option and Context Menu
The app shows two text boxes. Menus are used to change text’s size, color, and style.
Example 1: Using Option and Context Menu
Example 1: Using Option and Context Menu
Example 1: Using Option and Context Menu
Example 1: Using Option and Context Menu
Comments on Creating an Option & Context
Menu
Step1.
Indicate which widget(s) on your activity have context menus. To do this, call
registerForContextMenu(theWidget)
supplying the View that is the widget needing a context menu.
Step2.
Implement onCreateContextMenu(…), populate your menu adding
text, icons, etc. to the different options.Use input menu parameter
to determine which menu to build (assuming your activity has
more than one).
The onCreateContextMenu()method gets the Context Menu itself, the View the context
menu is associated with, and a ContextMenu. ContextMenuInfo, which tells you which item in
the list the user did the tap-and-hold over, in case you want to customize the context menu
based on that information
Comments on Creating an Option & Context Menu
•onCreateContextMenu() is called each time the context menu
is requested.
•Unlike the options menu (which is only built once per activity),
context menus are discarded once they are used or dismissed.
•To find out when a context menu choice was chosen,
implement onContextItemSelected() on the activity.
Example 1: Using Option and Context Menu
Selection Widgets
Selection Widgets
Radio Buttons and Check Buttons are suitable for selecting
from a smallset of options.
When the pool of choices is larger other widgets are more
appropriate, those include classic UI controls such as: list
boxes, combo boxes, drop-down lists, picture galleries, etc.
Android offers a framework of data adapters that provide a
common interface to selection lists ranging from static arrays to
database contents.
Selection views –widgets for presenting lists of choices –are
handed an adapter to supply the actual choices.
Displaying/Selecting Options
Using Array Adapter
 The easiest adapter to use is ArrayAdapter–all you need to do is wrap one of these
around a Java array or java.util.List instance, and you have a fully functioning
adapter:
The Array Adapter constructor takes three parameters:
1.The Context to use (typically this will be your activity instance)
2.The resource ID of a view to use (such as the built-in system resource
android.R.layout.simple_list_item_1as shown above)
3.The actual (source) array or list of items to show
Example 1: A simple list
Instead of Activity we will use a ListActivity which is an Android class specializing in
the use of ListViews.
Example 1: A simple list (Activity)
Instead of Activity we will use a ListActivity which is an Android class specializing in
the use of ListViews.
Example 1: A simple list (Adapter)
Example 1: A simple list (out put)
Selection Widgets - Spin Control
In Android, the Spinner is the equivalent of the drop-down
selector.
Spinners have the same functionality of a ListView but take
less space.
As with ListView, you provide the adapter for linking data to
child views using setAdapter()
Add a listener object to capture selections made from the list
with setOnItemSelectedListener().
Use the setDropDownViewResource()method to supply
the resource ID of the multi-line selection list view to use.
Example - Using the Spinner (Demo)
Example - Using the Spinner (Xml Layout)
Example - Using the Spinner (Activity)
Example - Using the Spinner (Events)
Selection Widgets - GridView
GridView is a ViewGroup that displays items in a two-dimensional, scrollable
grid.
The grid items are automatically inserted to the layout using a ListAdapter.
Example . Grid View (Xml Layout)
Example . Grid View (Activity)
Example . Grid View (Events)
Selection Widgets - AutoCompleteTextView
With auto-completion, as the user types, the text is treated as
a prefix filter, comparing the entered text as a prefix against a
list of candidates.
Matches are shown in a selection list that, like with Spinner, folds
down from the field.
The user can either type out a new entry (e.g., something not in
the list) or choose an entry from the list to be the value of the field.
AutoCompleteTextView subclasses EditText, so you can configure
all the standard look-and-feel aspects, such as font face and color.
AutoCompleteTextView has a
android:completionThresholdproperty, to indicate the
minimum number of characters a user must enter before the
list filtering begins.
Example . Auto Complete TextView
Example . AutoCompleteTextView (Xml layout)
Example . Auto Complete TextView (Activity)
Example . AutoCompleteTextView (Events)
Selection Widgets - Gallery Widget
The Gallery widget provides a set of options depicted as images.
Image choices are offered on a contiguous horizontal mode, you
may scroll across the image-set.
Example - Gallery Widget (XML Layout)
Example - Gallery Widget (Activity)
Example - Gallery Widget (Events)
Example - Gallery Widget (Adapter)
Example - Gallery Widget (Adapter - cont)
Example - Gallery Widget (Adapter - cont)
Example - Gallery Widget (Adapter - cont)
Questions?

Weitere ähnliche Inhalte

Was ist angesagt? (7)

Multiselect list
Multiselect listMultiselect list
Multiselect list
 
Model builder in ARC GIS
Model builder in ARC GISModel builder in ARC GIS
Model builder in ARC GIS
 
Model View Controller
Model View ControllerModel View Controller
Model View Controller
 
Alv report-tutorial-www.sapexpert.co .uk-
Alv report-tutorial-www.sapexpert.co .uk-Alv report-tutorial-www.sapexpert.co .uk-
Alv report-tutorial-www.sapexpert.co .uk-
 
Access Database Manager fro Mac
Access Database Manager fro MacAccess Database Manager fro Mac
Access Database Manager fro Mac
 
Lecture6 oopj
Lecture6 oopjLecture6 oopj
Lecture6 oopj
 
How to use a spreadsheet
How to use a spreadsheetHow to use a spreadsheet
How to use a spreadsheet
 

Andere mochten auch

Lec11 semaphores
Lec11 semaphoresLec11 semaphores
Lec11 semaphores
anandammca
 
Internal and external business environment
Internal and external business environmentInternal and external business environment
Internal and external business environment
Aashish Sahi
 

Andere mochten auch (13)

Android gui framework
Android gui frameworkAndroid gui framework
Android gui framework
 
Experience protocol buffer on android
Experience protocol buffer on androidExperience protocol buffer on android
Experience protocol buffer on android
 
The Android graphics path, in depth
The Android graphics path, in depthThe Android graphics path, in depth
The Android graphics path, in depth
 
GPU, CUDA, OpenCL and OpenACC for Parallel Applications
GPU, CUDA, OpenCL and OpenACC for Parallel ApplicationsGPU, CUDA, OpenCL and OpenACC for Parallel Applications
GPU, CUDA, OpenCL and OpenACC for Parallel Applications
 
Lec11 semaphores
Lec11 semaphoresLec11 semaphores
Lec11 semaphores
 
Android graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspectiveAndroid graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspective
 
Graphics processing unit (GPU)
Graphics processing unit (GPU)Graphics processing unit (GPU)
Graphics processing unit (GPU)
 
Graphics processing unit ppt
Graphics processing unit pptGraphics processing unit ppt
Graphics processing unit ppt
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 
What is CPU Register? Type of CPU Register.
What is CPU Register? Type of CPU Register.What is CPU Register? Type of CPU Register.
What is CPU Register? Type of CPU Register.
 
Design and Concepts of Android Graphics
Design and Concepts of Android GraphicsDesign and Concepts of Android Graphics
Design and Concepts of Android Graphics
 
Internal and external business environment
Internal and external business environmentInternal and external business environment
Internal and external business environment
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Ähnlich wie 01 10 - graphical user interface - others

Day 4: Android: UI Widgets
Day 4: Android: UI WidgetsDay 4: Android: UI Widgets
Day 4: Android: UI Widgets
Ahsanul Karim
 
Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]
Ahsanul Karim
 
Windows Programming with AWT
Windows Programming with AWTWindows Programming with AWT
Windows Programming with AWT
backdoor
 

Ähnlich wie 01 10 - graphical user interface - others (20)

Android menus in android-chapter15
Android menus in android-chapter15Android menus in android-chapter15
Android menus in android-chapter15
 
Android interface elements and controls-chapter8
Android interface elements and controls-chapter8Android interface elements and controls-chapter8
Android interface elements and controls-chapter8
 
"Android" mobilių programėlių kūrimo įvadas #2
"Android" mobilių programėlių kūrimo įvadas #2"Android" mobilių programėlių kūrimo įvadas #2
"Android" mobilių programėlių kūrimo įvadas #2
 
Maliram poonia project
Maliram poonia projectMaliram poonia project
Maliram poonia project
 
Day 4: Android: UI Widgets
Day 4: Android: UI WidgetsDay 4: Android: UI Widgets
Day 4: Android: UI Widgets
 
Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]Day 5: Android User Interface [View Widgets]
Day 5: Android User Interface [View Widgets]
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01
 
java
javajava
java
 
Android UI Fundamentals part 1
Android UI Fundamentals part 1Android UI Fundamentals part 1
Android UI Fundamentals part 1
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01
 
Swing jecrc
Swing jecrc Swing jecrc
Swing jecrc
 
AWT information
AWT informationAWT information
AWT information
 
List Views
List ViewsList Views
List Views
 
Lesson 9
Lesson 9Lesson 9
Lesson 9
 
Basic controls in asp
Basic controls in aspBasic controls in asp
Basic controls in asp
 
Windows Programming with AWT
Windows Programming with AWTWindows Programming with AWT
Windows Programming with AWT
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
GUI components in Java
GUI components in JavaGUI components in Java
GUI components in Java
 
Building a simple user interface lesson2
Building a simple user interface lesson2Building a simple user interface lesson2
Building a simple user interface lesson2
 
Android session 3
Android session 3Android session 3
Android session 3
 

Mehr von Siva Kumar reddy Vasipally (10)

01 11 - graphical user interface - fonts-web-tab
01  11 - graphical user interface - fonts-web-tab01  11 - graphical user interface - fonts-web-tab
01 11 - graphical user interface - fonts-web-tab
 
01 09 - graphical user interface - basic widgets
01  09 - graphical user interface - basic widgets01  09 - graphical user interface - basic widgets
01 09 - graphical user interface - basic widgets
 
01 08 - graphical user interface - layouts
01  08 - graphical user interface - layouts01  08 - graphical user interface - layouts
01 08 - graphical user interface - layouts
 
01 07 -android programming basics (cont)
01  07 -android programming basics (cont)01  07 -android programming basics (cont)
01 07 -android programming basics (cont)
 
01 06 - android programming basics
01  06 - android programming basics01  06 - android programming basics
01 06 - android programming basics
 
01 05 - introduction xml
01  05 - introduction xml01  05 - introduction xml
01 05 - introduction xml
 
01 04 - android set up and creating an android project
01  04 - android set up and creating an android project01  04 - android set up and creating an android project
01 04 - android set up and creating an android project
 
01 03 - introduction to android
01  03 - introduction to android01  03 - introduction to android
01 03 - introduction to android
 
01 02 - introduction - adroid stack
01  02 - introduction - adroid stack01  02 - introduction - adroid stack
01 02 - introduction - adroid stack
 
01 01 - introduction to mobile application development
01  01 - introduction to mobile application development01  01 - introduction to mobile application development
01 01 - introduction to mobile application development
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

01 10 - graphical user interface - others

  • 2. Agenda Familiarize with the main types of GUI components Layouts Basic Widgets Others
  • 4. Using Menus Menus is not consuming ‘much’ view space. Android provides two types of menu known as: options menu and context menu.  The options menu is triggered by pressing the hardware Menu button on the device, while  The context menu is raised by a tap-and-hold on the widget associated to the menu.
  • 5. Using Menus Example: Using an option menu Options available in this context Press Menu Button A max of six entries per menu. Excess will be displayed as part of the More option
  • 6. Example: Using an option menu Available Options in this context Press Menu button Using Menus
  • 7. Example : Dealing with SMS (text-messages) by using the built- in Messaging app’s context menu Tap-&-Hold Using Menus
  • 8. Option and Context Menus may include: 1. Text 2. Icons 3. Radio Buttons 4. Check Boxes 5. Sub-menus 6. Short-cut keys
  • 12. Example 1: Using Option and Context Menu The app shows two text boxes. Menus are used to change text’s size, color, and style.
  • 13. Example 1: Using Option and Context Menu The app shows two text boxes. Menus are used to change text’s size, color, and style.
  • 14. Example 1: Using Option and Context Menu The app shows two text boxes. Menus are used to change text’s size, color, and style.
  • 15. Example 1: Using Option and Context Menu
  • 16. Example 1: Using Option and Context Menu
  • 17. Example 1: Using Option and Context Menu
  • 18. Example 1: Using Option and Context Menu
  • 19. Comments on Creating an Option & Context Menu Step1. Indicate which widget(s) on your activity have context menus. To do this, call registerForContextMenu(theWidget) supplying the View that is the widget needing a context menu. Step2. Implement onCreateContextMenu(…), populate your menu adding text, icons, etc. to the different options.Use input menu parameter to determine which menu to build (assuming your activity has more than one). The onCreateContextMenu()method gets the Context Menu itself, the View the context menu is associated with, and a ContextMenu. ContextMenuInfo, which tells you which item in the list the user did the tap-and-hold over, in case you want to customize the context menu based on that information
  • 20. Comments on Creating an Option & Context Menu •onCreateContextMenu() is called each time the context menu is requested. •Unlike the options menu (which is only built once per activity), context menus are discarded once they are used or dismissed. •To find out when a context menu choice was chosen, implement onContextItemSelected() on the activity.
  • 21. Example 1: Using Option and Context Menu
  • 23. Selection Widgets Radio Buttons and Check Buttons are suitable for selecting from a smallset of options. When the pool of choices is larger other widgets are more appropriate, those include classic UI controls such as: list boxes, combo boxes, drop-down lists, picture galleries, etc. Android offers a framework of data adapters that provide a common interface to selection lists ranging from static arrays to database contents. Selection views –widgets for presenting lists of choices –are handed an adapter to supply the actual choices.
  • 25. Using Array Adapter  The easiest adapter to use is ArrayAdapter–all you need to do is wrap one of these around a Java array or java.util.List instance, and you have a fully functioning adapter: The Array Adapter constructor takes three parameters: 1.The Context to use (typically this will be your activity instance) 2.The resource ID of a view to use (such as the built-in system resource android.R.layout.simple_list_item_1as shown above) 3.The actual (source) array or list of items to show
  • 26. Example 1: A simple list Instead of Activity we will use a ListActivity which is an Android class specializing in the use of ListViews.
  • 27. Example 1: A simple list (Activity) Instead of Activity we will use a ListActivity which is an Android class specializing in the use of ListViews.
  • 28. Example 1: A simple list (Adapter)
  • 29. Example 1: A simple list (out put)
  • 30. Selection Widgets - Spin Control In Android, the Spinner is the equivalent of the drop-down selector. Spinners have the same functionality of a ListView but take less space. As with ListView, you provide the adapter for linking data to child views using setAdapter() Add a listener object to capture selections made from the list with setOnItemSelectedListener(). Use the setDropDownViewResource()method to supply the resource ID of the multi-line selection list view to use.
  • 31. Example - Using the Spinner (Demo)
  • 32. Example - Using the Spinner (Xml Layout)
  • 33. Example - Using the Spinner (Activity)
  • 34. Example - Using the Spinner (Events)
  • 35. Selection Widgets - GridView GridView is a ViewGroup that displays items in a two-dimensional, scrollable grid. The grid items are automatically inserted to the layout using a ListAdapter.
  • 36. Example . Grid View (Xml Layout)
  • 37. Example . Grid View (Activity)
  • 38. Example . Grid View (Events)
  • 39. Selection Widgets - AutoCompleteTextView With auto-completion, as the user types, the text is treated as a prefix filter, comparing the entered text as a prefix against a list of candidates. Matches are shown in a selection list that, like with Spinner, folds down from the field. The user can either type out a new entry (e.g., something not in the list) or choose an entry from the list to be the value of the field. AutoCompleteTextView subclasses EditText, so you can configure all the standard look-and-feel aspects, such as font face and color. AutoCompleteTextView has a android:completionThresholdproperty, to indicate the minimum number of characters a user must enter before the list filtering begins.
  • 40. Example . Auto Complete TextView
  • 42. Example . Auto Complete TextView (Activity)
  • 44. Selection Widgets - Gallery Widget The Gallery widget provides a set of options depicted as images. Image choices are offered on a contiguous horizontal mode, you may scroll across the image-set.
  • 45. Example - Gallery Widget (XML Layout)
  • 46. Example - Gallery Widget (Activity)
  • 47. Example - Gallery Widget (Events)
  • 48. Example - Gallery Widget (Adapter)
  • 49. Example - Gallery Widget (Adapter - cont)
  • 50. Example - Gallery Widget (Adapter - cont)
  • 51. Example - Gallery Widget (Adapter - cont)