mohaxspb / Odnako

Odnako
https://play.google.com/store/apps/details?id=ru.kuchanov.odnako
5 stars 0 forks source link

Fragment-Activity lifeCycle issue; #21

Closed mohaxspb closed 9 years ago

mohaxspb commented 9 years ago

There is another instance of artsList fragment on each second screen rotation, so each second time we have no info in savedInstanceState Bundle of these fragments.

What we can do?

(We gain allArtsInfo for listFrag from bundle now. If it's null, we set default info and send request to service)

So, as I understand we can simply gain allArtsInfo from hashMap of mainActivity by categoryToLoad... And so we can rewrite it in future by request to RESTful...

But now we have default info in hashMap on first lunch in MainActivity; So we need to write a method of gain info with timeStamp. If it is more than some const interval, we will start request to service;

mohaxspb commented 9 years ago

Done.