If you not understand this lecture List View in android studio .You should also read my previous lectures. Checkbox creation using android studio and Radio button using android studio. After reading these lecture you will also able to create List view of your app.


List View is widely used in Android Android List View is a view group that displays a list of scrollable items.If you have a date which is repeated in the form of  list, the list view is the best Option to use. List View helps you in displaying repeating data in the form of a scrollable list. Users can then select any List view by selecting on it.


In this lecture will we describe how can create List View in android.We will also describe List View description.what is List View. why we can use it .After Reading this lecture you will understand List View in android And i hope you will create List View of your application.

Description of List View

In this lecture we will describe how can create list view in android. List View show some scrollable items.So I will create application in android that will Demonstrate how can create a List View  in android.And how to  handle click events in List View. First of all you will create a new project in android studio.  Every project contain two file first is java class file and second is layout XML File. Your first step is open a layout XML file. and add a list  view and set height and width. And also assign id to text view. and look the design.For more detail about List view in android please click on list view in android.In this example we are going to create a simple UI that includes only (list view in android ) with Different attributes.And paste the following code List View in android into layout .XML file.

Now you may open the Graphical layout editor to preview the User Interface you created of List view  in android.

Alt Tag android list view in android

In android, different types of adapters are available that are used to add the data, stored in different data files to a “List View” .Different Adapters are used depending on the source of data.For example if the data source is a string Array you can use “Array Adapter” and if the data source is a database file you can use “Curse Adapter” instead of “Array Adapter”.So in your case data is stored in a string Array named “Android Versions” you have to Use “Array Adapter”. In order to use Array Adapter you have to create an object of “Array Adapter” in “Main “file.

Code that are Write in java class file of List View in android

Run the application of  List View in android

Alt Tag android list view output in android

When you select option Froyo  in List View then output show in below pic
Alt Tag android list view option select in android
When you select option Ice Cream  Sandwitch in List view then output show in below pic

Alt Tag android list view option in androis

Thank you  for reading this lecture Hope you got the idea.