[android-developers] Re: Share Loader's data between multiple fragment

2014-06-04 Thread Doug
I would do #2, except don't use setArguments to pass the data in. When the loader callbacks fire, just reach into each fragment instance directly and call a custom method to pass the model in. You might have to check fragment class types and cast to implement this. Personally I would make

[android-developers] well, when tracking location in Google maps (eg. every 5sec) what i must use?

2014-06-04 Thread lselwd
In HTML5 hybrid development (eg with PhoneGap) in Android or iOS or BB or WP Is best when google map find current location use accuracy HIGH with fall back to LOW... well, when tracking location in Google maps (eg. every 5sec) what i must use and how? can you give urls to sample code...

[android-developers] Re: Share Loader's data between multiple fragment

2014-06-04 Thread MathieuB
Like Doug said. That's sort of how i'm doing it and had no problem. So #2 kind of. Here's my onLoadFinished : @Override public void onLoadFinished(LoaderArrayListTour loader, ArrayListTour data) { CatalogTabFeatured featuredFragment = (CatalogTabFeatured)

Re: [android-developers] Re: Share Loader's data between multiple fragment

2014-06-04 Thread Nathan Barraille
Yeah, I guess I can do that, but if I do I need to write custom code for retaining the arguments across instance change, which I would have liked the framework to be able to do for me, as described here: https://groups.google.com/forum/#!topic/android-developers/bCc5tjOHQ1o On Wed, Jun 4, 2014

[android-developers] Re: Camera preview center crop without SurfaceTexture

2014-06-04 Thread Sam Duke
Note to others: the solution was to use a textureview (android 14+) On Friday, 25 April 2014 17:57:11 UTC+1, Sam Duke wrote: Im trying to show a camera preview to the user of arbitrary size. What I'd like to do is pick an appropriate camera size based on the size of the preview, then

Re: [android-developers] Re: Share Loader's data between multiple fragment

2014-06-04 Thread Kostya Vasilyev
Couldn't you abstract the different ways of loading data inside the loader? ...and pass some sort of unique data ID to each fragment to identity the data, but not the actual way of obtaining it (network, content provider, etc.). Then you'd be able to package this ID into each fragment's