2. 0UTLINE
201
7
015 201
4
Arrays
Lists
Array Adapter
List View
Recycler View
Mini Photo Gallery App
Scope & Future of Android in Pakistan
3. Arrays
• Array is used to store multiple values of same data type in single variable. The size
of array is fixed and defined when it is created.
• Array index value start with 0.
Data
Type
Array
Name
Array
Value
Access
Modifiers
4. Lists
• Android List View is a view which
groups several items and display them
in vertical scrollable list. The list items
are automatically inserted to
the list using an Adapter that pulls
content from a source such as an array
or database.
Generics
<>
5. Array Adapter
• The Adapter acts as a bridge between the UI Component and the Data Source.
It converts data from the data sources into view items that can be displayed
into the UI Component. Data Source can be Arrays, HashMap, Database, etc.
and UI Components can be List View, Grid View, Spinner, etc. Array Adapter is
the most used adapter in android. When you have a list of single type items
which are stored in an array you can use Array Adapter. Likewise, if you have a
list of phone numbers, names, or cities.
6. List View
• Android List View is a view which contains the group of items and displays in a
scrollable list. List View is implemented by importing android.widget.ListView class.
List View is a default scrollable which does not use other scroll view.
• List View uses Adapter classes which add the content from data source (such as
string array, array, database etc.) to List View. Adapter bridges data between
an Adapter Views and other Views (List View, Scroll View etc.).
8. Recycler View
• The RecyclerView class extends
the ViewGroup class and
implements ScrollingView interface.
• It is introduced in Marshmallow.
• It is an advanced version of the List
View with improved performance and
other benefits. Recycler View is mostly
used to design the user interface with
the fine-grain control over the lists and
grids of android application.
9. Mini Photo Gallery App
• GridView
• Image Adapter Class
• Images in drawable