Home > Mobile >  Novice consult a network data access code location of the problem, thank you.
Novice consult a network data access code location of the problem, thank you.

Time:04-14

This is a page data to demonstrate a lot of App, use Tablayout + ViewPaget + fragments to build the main page, in the first page fragments have four RecyclerView again, other fragments have a RecyclerView,

Number of Tab pages of data, including Tablayout etc., from the back-end Json generated after parsing, different connection return different location data,

Data acquisition is to use Okhttp and Fastjson, can I use the Get method in the MainActivity Get Tablayout data and some notice, in the callback function new several fragments page,

But in the fragments generated onCreateView or what interface, can apply for another connection data, program won't walk into, as if involves the thread back, checked on the net, also does not have the corresponding case,

Contact with Android is less than a month, a lot of things to understand, shallow
Please comment, like this Tablayout + ViewPaget + fragments is tie-in, network data acquisition and transmission in general how to design?

CodePudding user response:

I see a lot of similar projects, as if through a Handler to create a new thread specializes in processing data, to do the data distribution,
  • Related