How To Create a ListView In Android Studio - Android ListView Tutorial

Sunday, 5 February 2017

ListView is a view group that displays a list of scrollable items. The list items are automatically inserted to the list using an Adapter that pulls content from a source such as an array or database query and converts each item result into a view that's placed into the list.

Step 1 :Open activity_main.xml and write the code below to make ListView in the design part.

Step 2:Create a values.xml file by right clicking on values for string array data and name it months.xml
 values -> new -> values resource file 
Step 3:Add below string array.This is the data that is be presented on listview.

Step 4:Add this code below in MainActivity.