简体   繁体   中英

Get json data in recyclerView

HOW CAN GET launch_failure_details IN THIS CODE https://api.spacexdata.com/v2/launches .

THERE ARE JUST 5 launch_failure_details and ı display every entity but launch_failure_details is not. How can ı control this entity?

There are some strategies.

  1. Initial all the data in advance (So the data which is lacked could have a initial value)

     public class Person { private int height=0; private int weight=0; private int year = 0; }
  2. Check the data is null or not before you use it

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