any more comment on this ?
On 22 juil, 11:00, Guian guiandou...@gmail.com wrote:
but I'm not adding twice the same fragment in one fragment
transaction.
here is what happens :
1) launch app
= call to onTabSelected = add my fragment with this piece of
code:
but I'm not adding twice the same fragment in one fragment
transaction.
here is what happens :
1) launch app
= call to onTabSelected = add my fragment with this piece of
code:
if(!fragmentsToAdd.isAdded())
ft.add( R.id.parent, fragmentsToAdd, myFragment);
2) pressing the Back
I have a same problem, my fragment lost the reference of activity
after pause/resume...
I don't understand the fragment's lifecycle.
On 19 juil, 15:10, Guian guiandou...@gmail.com wrote:
well well ...
here is the fix I used :
on the creation of my fragment I add a test in
Committing a fragment is asynchronous; isAdded() doesn't return true until
the transaction is committed.
On Thu, Jul 21, 2011 at 9:33 AM, Gab gabriel.del...@gmail.com wrote:
I have a same problem, my fragment lost the reference of activity
after pause/resume...
I don't understand the
I've seen that isAdded() can return false even if the field 'mAdded'
in the Fragment is true ?
(seen in the 'Variables' view in eclipse )
does anybody know why ?
On 19 juil, 11:46, Guian guiandou...@gmail.com wrote:
I can't understand how this piece of code :
here is the source code for isAdded :
/**
* Return true if the fragment is currently added to its activity.
*/
final public boolean isAdded() {
return mActivity != null mAdded;
}
indeed ... mActivity is null...
I guess I have to recreate this fragment from
well well ...
here is the fix I used :
on the creation of my fragment I add a test in fragment.getActivity()
is null ...
if(testFragment == null || testFragment.getActivity()==null)
testFragment = (TestFragment) TestFragment.instantiate(context,
com.mypackage.test.MyFragment);
and I
7 matches
Mail list logo