{"id":83709,"date":"2021-08-17T09:00:58","date_gmt":"2021-08-17T03:30:58","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=83709"},"modified":"2024-08-05T11:14:46","modified_gmt":"2024-08-05T05:44:46","slug":"android-listview","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/android-listview\/","title":{"rendered":"Android ListView"},"content":{"rendered":"<p>In this article, we&#8217;ll dive deep into Android ListView and its implementation. ListView is an essential component for displaying a large number of items in a scrollable, vertical list. Each item in a ListView is arranged in horizontal rows, making it easy to browse through your data by simply scrolling.<\/p>\n<p>To populate your ListView with items, you&#8217;ll need to use an Android Adapter. If you&#8217;re unfamiliar with Android Adapter, I recommend exploring it before continuing with this article. An adapter acts as a bridge between the View Group and your data source, enabling you to fetch data items from a database or any other data source and display them efficiently in the ListView.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/List-View2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-83798\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/List-View2.jpg\" alt=\"List View in Android\" width=\"311\" height=\"502\" \/><\/a><\/p>\n<p>To add items to the ListView, you need to use the Android Adapter. If you don\u2019t know Android Adapter, you must see it before reading this article. Android Adapter acts as a medium between the View Group and the data source. It allows you to fetch the data items from the database or a known data source and then put that up on the ListView.<\/p>\n<h3>Android ListView<\/h3>\n<p>As discussed earlier, Android ListView is used to display items in the form of a list. The list is vertically scrollable and contains items in the form of rows.<\/p>\n<p>Beyond just displaying items, ListView enables you to add interactive functionalities to each row. For example, when a user clicks on an item, you can display detailed information about it. This is particularly useful in applications like Swiggy and Zomato, where ListView is used to showcase available restaurants. Users can scroll through the list to find their desired restaurant and, upon clicking, view the menu and other details of that restaurant.<\/p>\n<p>You can look at the below image to understand how a listview looks in android. You can see three types of list views:<\/p>\n<ul>\n<li>The first one shows you a ListView containing both image and text.<\/li>\n<li>The second ListView is a simple one having just a normal TextView.<\/li>\n<li>The third ListView shows list items having a heading and a brief description.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/ListView-in-Android.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-83797\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/ListView-in-Android.jpg\" alt=\"ListView in Android\" width=\"878\" height=\"628\" \/><\/a><\/p>\n<p>To create your ListView first, define its styling in the XML layout and then attach the adapter to provide items into your list.<\/p>\n<p><strong>XML Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;ListView\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_marginTop=\"20dp\"\r\n        android:padding=\"10dp\"\r\n        android:divider=\"#E91E63\"\r\n        android:dividerHeight=\"10dp\"\r\n        android:id=\"@+id\/your_list_view\"\r\n        \/&gt;\r\n<\/pre>\n<p><strong>Kotlin Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ binding the list view with our variable\r\n mListView = findViewById(R.id.your_list_view)\r\n\r\n\/\/creating the array adapter object\r\narrayAdapter = ArrayAdapter(this,android.R.layout.simple_list_item_1, your_array)\r\n\r\n\/\/setting the adapter to your list view\r\nmListView.adapter = arrayAdapter\r\n<\/pre>\n<h3>Android ListView Attributes<\/h3>\n<p>ListView has some of its attributes that are used to set up the characteristics of your ListView. Let\u2019s see each of those attributes below.<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Attribute Name<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">android:id<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The \u201cid\u201d attribute is used to identify ListView uniquely among other views present in the layout.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">android:divider<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The \u201cdivider\u201d attribute is used to add a drawable item or put a color to separate two rows in the list.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">android:dividerHeight<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The \u201cdividerHeight\u201d is used to define the height of the divider we wish to have between two rows.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">android:background<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The \u201cbackground\u201d attribute is used to set a color or an image as the background of the ListView.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">android:entries<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The \u201centries\u201d attribute is used to specify the array source from where the elements are coming.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">android:choiceMode<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The \u201cchoiceMode\u201d attribute is used to specify the number of items that can be selected at once from the list.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">android:textSize<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The \u201ctextSize\u201d is used to set the font size of the data items visible in the list.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">android:footerDividersEnabled<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The \u201cfooterDividersEnabled\u201d has two values: true or false. By default, it\u2019s true, but when set to false, the ListView won\u2019t draw any divider before each footer.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">android:headerDividersEnabled<\/span><\/td>\n<td><span style=\"font-weight: 400;\">The \u201cheaderDividersEnabled\u201d has two values: true or false. By default, it\u2019s true, but when set to false, the ListView won\u2019t draw any divider after each header.\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Implementation of Android ListView<\/h4>\n<p>To implement the Android ListView, you need to use Android Adapters. Android Adapters\u2019 task is to bring data from the data source and then put it into the ListView. Now to do this, we are available with two kinds of Adapters. We will see the implementation using each of the adapters and understand the difference in using them.<\/p>\n<h5>A. Using Array Adapter<\/h5>\n<p>When your data is in the form of an array, and you don\u2019t require much custom styling over the items of the list, then you use ArrayAdapter. It\u2019s pretty easy to implement, and we have provided you with the code for your better understanding.<\/p>\n<p><strong>1:<\/strong> First, open your Android Studio and create a project and name it. In my case, the name of the project is \u201cArrayListView.\u201d<\/p>\n<p><strong>2:<\/strong> Now open your activity_main.xml of your project and paste the below code there.<\/p>\n<p><strong>Code: activity_main.xml<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;LinearLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n    xmlns:tools=\"http:\/\/schemas.android.com\/tools\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    android:orientation=\"vertical\"\r\n    tools:context=\".MainActivity\"&gt;\r\n\r\n    &lt;TextView\r\n        android:id=\"@+id\/title\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:text=\"Array Adapter ListView\"\r\n        android:textSize=\"30sp\"\r\n        android:gravity=\"center\"\r\n        android:layout_marginTop=\"30dp\"\r\n        android:textColor=\"#E91E63\"\r\n        \/&gt;\r\n\r\n    &lt;ListView\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_marginTop=\"20dp\"\r\n        android:padding=\"10dp\"\r\n        android:divider=\"#E91E63\"\r\n        android:dividerHeight=\"10dp\"\r\n        android:id=\"@+id\/array_list_view\"\r\n        \/&gt;\r\n\r\n\r\n\r\n&lt;\/LinearLayout&gt;\r\n<\/pre>\n<p><strong>3:<\/strong> Now open your MainActivity. Here you need to define the ListView and attach the ArrayAdapter to it.<\/p>\n<p><strong>Code: MainActivity.kt<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.techvidvan.arraylistview\r\n\r\nimport android.os.Bundle\r\nimport android.widget.ArrayAdapter\r\nimport android.widget.ListView\r\nimport androidx.appcompat.app.AppCompatActivity\r\n\r\nclass MainActivity : AppCompatActivity()\r\n{\r\n    \/\/declaring variables\r\n    lateinit var arrayAdapter: ArrayAdapter&lt;*&gt;\r\n    lateinit var mListView: ListView\r\n\r\n    override fun onCreate(savedInstanceState: Bundle?)\r\n    {\r\n        super.onCreate(savedInstanceState)\r\n        setContentView(R.layout.activity_main)\r\n\r\n        \/\/creating 30 items to add into the ListView\r\n        var item_list = ArrayList&lt;String&gt;();\r\n\r\n        for (i in 1..30 step 1) {\r\n            item_list.add(\"Tech Vidvan Item $i \")\r\n        }\r\n\r\n        \/\/ binding the list view with our variable\r\n        mListView = findViewById(R.id.array_list_view)\r\n\r\n        \/\/creating the array adapter object\r\n        arrayAdapter = ArrayAdapter(this,\r\n            android.R.layout.simple_list_item_1, item_list)\r\n\r\n        \/\/setting the adapter to our list view\r\n        mListView.adapter = arrayAdapter\r\n    }\r\n}\r\n<\/pre>\n<p>Now, test your application on your device or emulator and experience the ListView.<\/p>\n<p><strong>[Keep App_Video_1<\/strong> <strong>here]<\/strong><\/p>\n<h5>B. Using Base Adapter<\/h5>\n<p>Base Adapter is another way to provide data items to your ListView. Let\u2019s see how you can use BaseAdapter to implement the ListView.<\/p>\n<p><strong>1:<\/strong> Open your android studio and create a project called \u201cBaseListView.\u201d<\/p>\n<p><strong>2:<\/strong> You now need to add a ListView in your activity_main.xml file.<\/p>\n<p><strong>Code: activity_main.xml<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;LinearLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n    xmlns:tools=\"http:\/\/schemas.android.com\/tools\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    android:orientation=\"vertical\"\r\n    tools:context=\".MainActivity\"&gt;\r\n\r\n    &lt;TextView\r\n        android:id=\"@+id\/title\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:text=\"Base Adapter ListView\"\r\n        android:textSize=\"30sp\"\r\n        android:gravity=\"center\"\r\n        android:layout_marginTop=\"30dp\"\r\n        android:textColor=\"#FF9800\"\r\n        \/&gt;\r\n\r\n    &lt;ListView\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"wrap_content\"\r\n        android:layout_marginTop=\"20dp\"\r\n        android:padding=\"10dp\"\r\n        android:divider=\"#FF9800\"\r\n        android:dividerHeight=\"5dp\"\r\n        android:id=\"@+id\/base_list_view\"\r\n        \/&gt;\r\n\r\n\r\n\r\n&lt;\/LinearLayout&gt;\r\n<\/pre>\n<p><strong>3:<\/strong> Now, you need to create a custom layout for each row in the list. For this, you can go to res &#8212;&gt; select layout and create a new layout file. Name it as each_item.xml.<\/p>\n<p><strong>Code: each_item.xml<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;androidx.cardview.widget.CardView xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n    android:layout_width=\"match_parent\"\r\n    xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"\r\n    app:cardElevation=\"5dp\"\r\n    android:layout_margin=\"10dp\"\r\n    android:layout_height=\"wrap_content\"&gt;\r\n\r\n    &lt;LinearLayout\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"match_parent\"\r\n        android:padding=\"20dp\"\r\n        android:orientation=\"vertical\"&gt;\r\n\r\n        &lt;TextView\r\n            android:layout_width=\"match_parent\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:text=\"Item1\"\r\n            android:textSize=\"20sp\"\r\n            android:id=\"@+id\/heading_of_item\"\/&gt;\r\n\r\n\r\n        &lt;TextView\r\n            android:layout_width=\"match_parent\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:text=\"Item Description\"\r\n            android:textSize=\"16sp\"\r\n            \/&gt;\r\n\r\n    &lt;\/LinearLayout&gt;\r\n\r\n\r\n&lt;\/androidx.cardview.widget.CardView&gt;\r\n<\/pre>\n<p><strong>4:<\/strong> Now, you need to create a Base Adapter. For this, right-click on the package name, click on the new Kotlin Class file, and then name it MyAdapter.<\/p>\n<p><strong>Code: MyAdapter.kt<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.techvidvan.baselistview\r\n\r\nimport android.content.Context\r\nimport android.view.LayoutInflater\r\nimport android.view.View\r\nimport android.view.ViewGroup\r\nimport android.widget.BaseAdapter\r\nimport android.widget.ImageView\r\nimport android.widget.TextView\r\n\r\ninternal class MyAdapter\r\n    (\r\n    \/\/getting the context and the items list\r\n    \/\/from MainActivity\r\n    private val context: Context,\r\n    private val itemList:ArrayList&lt;String&gt;\r\n) :\r\n    BaseAdapter() {\r\n\r\n    \/\/declaring variables\r\n    private var layoutInflater: LayoutInflater? = null\r\n    private lateinit var headingItem:TextView\r\n\r\n    override fun getCount(): Int\r\n    {\r\n        \/\/getting the count of the data items\r\n        return itemList.size\r\n    }\r\n    override fun getItem(position: Int): Any? {\r\n        return null\r\n    }\r\n    override fun getItemId(position: Int): Long {\r\n        return 0\r\n    }\r\n    override fun getView(\r\n        position: Int,\r\n        convertView: View?,\r\n        parent: ViewGroup\r\n    ): View? {\r\n\r\n        \/\/creating the view\r\n        var baseView = convertView\r\n        if (layoutInflater == null) {\r\n\r\n            \/\/creating a layout inflater\r\n            layoutInflater =\r\n                context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater\r\n        }\r\n        if (convertView == null)\r\n        {\r\n            baseView = layoutInflater!!.inflate(R.layout.each_item, null)\r\n        }\r\n\r\n        \/\/fetching the heading TextView of each card\r\n        headingItem = baseView!!.findViewById(R.id.heading_of_item)\r\n        \/\/setting the text on the TextView\r\n        headingItem.setText(itemList[position])\r\n\r\n        return baseView\r\n    }\r\n}<\/pre>\n<p><strong>5:<\/strong> Finally, you need to add your MainActivity file and attach the adapter with your ListView as shown below.<\/p>\n<p><strong>Code: MainActivity.kt<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.techvidvan.baselistview\r\n\r\nimport androidx.appcompat.app.AppCompatActivity\r\nimport android.os.Bundle\r\nimport android.widget.ListView\r\n\r\nclass MainActivity : AppCompatActivity()\r\n{\r\n    lateinit var itemListView:ListView\r\n    override fun onCreate(savedInstanceState: Bundle?)\r\n    {\r\n        super.onCreate(savedInstanceState)\r\n        setContentView(R.layout.activity_main)\r\n\r\n        \/\/binding the ListView with our created variable\r\n        itemListView = findViewById(R.id.base_list_view)\r\n\r\n        \/\/creating 30 items to add into the ListView\r\n        var item_list = ArrayList&lt;String&gt;();\r\n\r\n        for (i in 1..30 step 1) {\r\n            item_list.add(\"Tech Vidvan Item $i \")\r\n        }\r\n\r\n        \/\/creating the object of our BaseAdapter\r\n        val adapterObj = MyAdapter(this@MainActivity, item_list)\r\n\r\n        \/\/setting the adapter to our ListView\r\n        itemListView.adapter = adapterObj\r\n    }\r\n}\r\n<\/pre>\n<p>Now, test your application on your device or emulator and experience the ListView.<\/p>\n<p><strong>[Keep App_Video_2 here]<\/strong><\/p>\n<h3>Summary<\/h3>\n<p>Through this article, you came across ListView and saw how you could display data items in the form of a list. Later on, you came across several attributes present in the ListView. Moving further, you saw the two different ways to implement Android ListView. I hope you understand ListView clearly and will use it in your projects whenever required.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we&#8217;ll dive deep into Android ListView and its implementation. ListView is an essential component for displaying a large number of items in a scrollable, vertical list. Each item in a ListView&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":83796,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2791],"tags":[4053,4054,4055],"class_list":["post-83709","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","tag-android-listview","tag-android-listview-attributes","tag-implementation-of-android-listview"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Android ListView - TechVidvan<\/title>\n<meta name=\"description\" content=\"Android ListView is used to display items in the form of a list. See its attributes and how to implement Android ListView.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/android-listview\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android ListView - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Android ListView is used to display items in the form of a list. See its attributes and how to implement Android ListView.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/android-listview\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-17T03:30:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-05T05:44:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/Android-ListView.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android ListView - TechVidvan","description":"Android ListView is used to display items in the form of a list. See its attributes and how to implement Android ListView.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/android-listview\/","og_locale":"en_US","og_type":"article","og_title":"Android ListView - TechVidvan","og_description":"Android ListView is used to display items in the form of a list. See its attributes and how to implement Android ListView.","og_url":"https:\/\/techvidvan.com\/tutorials\/android-listview\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2021-08-17T03:30:58+00:00","article_modified_time":"2024-08-05T05:44:46+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/Android-ListView.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/android-listview\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-listview\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Android ListView","datePublished":"2021-08-17T03:30:58+00:00","dateModified":"2024-08-05T05:44:46+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-listview\/"},"wordCount":1018,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-listview\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/Android-ListView.jpg","keywords":["Android ListView","Android ListView Attributes","Implementation of Android ListView"],"articleSection":["Android Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/android-listview\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/android-listview\/","url":"https:\/\/techvidvan.com\/tutorials\/android-listview\/","name":"Android ListView - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-listview\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-listview\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/Android-ListView.jpg","datePublished":"2021-08-17T03:30:58+00:00","dateModified":"2024-08-05T05:44:46+00:00","description":"Android ListView is used to display items in the form of a list. See its attributes and how to implement Android ListView.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-listview\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/android-listview\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/android-listview\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/Android-ListView.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/Android-ListView.jpg","width":1200,"height":628,"caption":"Android ListView"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/android-listview\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Android ListView"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/83709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=83709"}],"version-history":[{"count":2,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/83709\/revisions"}],"predecessor-version":[{"id":447595,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/83709\/revisions\/447595"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/83796"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=83709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=83709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=83709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}