Why is there a ListView in Android?

My question is, what we have ListViewand Gridviewto android.

List as

<ListView
  android:id="@android:id/list"
  android:layout_width="match_parent"
  android:layout_height="wrap_content" >
</ListView>

Now suppose I configured everything for the ListViewie adapter , created the data for the list. Now instead ListViewjust replace Gridviewwith

<GridView xmlns:android="http://schemas.android.com/apk/res/android" 
   android:id="@+id/gridview"
   android:layout_width="fill_parent" 
   android:layout_height="fill_parent"
   android:numColumns="1"/>

Gridviewacts like ListView, why does it exist ListView, if we can implement all the functions ListViewon Gridviewto determine android:numCloumns="1"? Any specific use of the list?

I know what is Gridviewused to arrange an element in a row and column.

+4
source share
1 answer

Android docs, ListView Gridiew , android.widget.AbsListView.
, . , , ..

, Development, , .

, Design of Application .

, , , . , : . . , . . , . , , , .

List , , , . , . .

, . image . .

, Grid View : .

, , !

+3

Source: https://habr.com/ru/post/1584596/


All Articles