ListView for android learning

istView is a control used to display the data of a list in Android. Almost most applications will use it. It displays specific content in the form of a list, and can display adaptively according to the length of the data. ListView inherits from AdapterView, and its display It is done through an adapter. The adapter loads data, and the ListView uses the adapter data to display each Item.

Adapter plays a vital role in the use of ListView. It is a bridge between ListView display and background data . Therefore, the basic use of ListView includes the following steps:
1. Create or obtain data, including pictures or text content
. 2. Build an adapter, and pass the data as the adapter's construction parameters.
3. Create a ListView and use setAdapter (adapter) to Set the constructed adapter to ListView

Guess you like

Origin blog.csdn.net/hd15656815531/article/details/80692086