简体   繁体   中英

How to set data in listView when got it from Retrofit request?

I have a request with Retrofit in java android and get my data as ListArray.
I have a listView with some items.
Please tell me how to set my data source array from Retrofit in my listView.

将改造响应转换为对象列表,而不是将其分配给全局引用。在列表视图适配器的getView函数中使用此列表对象来填充列表视图。每次响应后,通知数据都将通知到列表视图。

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