Hello,
I believe that your issue is caused by the fact that the 
viewpager instantiates the fragments only when needed.

You should take a look at  
http://developer.android.com/reference/android/support/v4/view/ViewPager.html#setOffscreenPageLimit(int)
 

On Monday, 10 September 2012 03:58:53 UTC+3, necronet wrote:
>
> I posted in SO, probably too much code for the group. 
>
> Tks
>
> Sincerly yours,
>
> [Jose Luis Ayerdis Espinoza]
> Necronet.info | 
> LinkedIn<http://www.linkedin.com/pub/jose-luis-ayerdis-espinoza/28/7b4/704>| 
> Careers 
> StackOverflow <http://careers.stackoverflow.com/necronet>
>
>
>
> 2012/9/10 Dianne Hackborn <[email protected] <javascript:>>
>
>> I don't think you have provided enough information to help.  The argument 
>> you supplied to instantiate() is just made available to the fragment 
>> through Fragment.getArguments().  Presumably the problem is then somewhere 
>> in your DetailFragment and how it is managing those arguments, but you 
>> haven't provided any information about this.
>>
>> On Sun, Sep 9, 2012 at 1:50 PM, Jose Ayerdis <[email protected]<javascript:>
>> > wrote:
>>
>>> Hello everybody, so I have run now with this problem when trying to use 
>>> FragmentStatePagerAdapter, I pick a specific element from a List and send 
>>> an array of ids with the position picked like this
>>>
>>> intent.putExtra("ids", ids);
>>>
>>> intent.putExtra("position", position);
>>>
>>> Then the activity is called which load the fragment 
>>>
>>>
>>>          @Override
>>>
>>>         public Fragment getItem(int i) {
>>>
>>>          fragments[i] = DetailFragment.newInstance(tradersId[i]);
>>>
>>>         return fragments[i];
>>>
>>>         }
>>>
>>> The problem is that inside the DetailFragment the values are set with 
>>> the Loader API and even when they reach  onLoadFinished and set the values 
>>> it never gets to be set. 
>>>
>>> Funny thing is that once I start switching views the values are set. Any 
>>> idea? Also the DetailFragment has a ListView inside which also loads with 
>>> the Loader API.
>>>
>>>
>>> Sincerly yours,
>>>
>>> [Jose Luis Ayerdis Espinoza]
>>> Necronet.info | 
>>> LinkedIn<http://www.linkedin.com/pub/jose-luis-ayerdis-espinoza/28/7b4/704>|
>>>  Careers 
>>> StackOverflow <http://careers.stackoverflow.com/necronet>
>>>  
>>>  -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to 
>>> [email protected]<javascript:>
>>> To unsubscribe from this group, send email to
>>> [email protected] <javascript:>
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>>
>> -- 
>> Dianne Hackborn
>> Android framework engineer
>> [email protected] <javascript:>
>>
>> Note: please don't send private questions to me, as I don't have time to 
>> provide private support, and so won't reply to such e-mails.  All such 
>> questions should be posted on public forums, where I and others can see and 
>> answer them.
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to