简体   繁体   中英

Trying to set listView in fragment with string array from parse

I am trying to set ListView in my fragment. The resourse that I am trying to show is from my class in Parse. when I am trying to show it, I get errors about there is no resourcse yet. The reason according to what I understand is the download infromation from parse taking more time than the app to show the the list.. so the app trying to show String array which is null. what should I do?

You should be retrieving data from Parse using the findInBackground method. Update your UI (in this case, populate your ListView with the retrieved data) inside the FindCallback you provide when initiating the request. This way you can be sure that you only attempt to interact with your UI when data is available.

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