Sunday, September 9, 2012

Re: [android-developers] FragmentStatePagerAdapter is not setting the UI elemtents when using Loader API

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 <joseayerdis@gmail.com> 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]

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



--
Dianne Hackborn
Android framework engineer
hackbod@android.com

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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment