简体   繁体   中英

Dynamic listview or text view when data is picked from database

I'm new to android development and stuck somewhere. Can anybody please help me to understand eg :- if there is a list view of 3 fruits and we want to fetch dynamically 50 different fruits name in a list view or text view.

Could somebody please help me with the code for regarding the above

The ListView will update dynamically with the collection of data(can be array, arraylist) you pass to adapter. fetch data and update your array,

call, adapter.notifyDataSetChanged();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM