Android – clips are not visually deleted

I'm trying to replace the fragment with a new fragment. To do this, I use the following code

However, when viewed on AVD, it is not actually replaced. Newfragment (smaller size) is displayed at the top of newfragment

However, visit old again_ When fragment, it returns null

I even tried

Even if this is not a visually deleted clip

Can you actually delete any fragments for me?

P. S.: I'm using the Android compatibility pack and building it for Android 2.2

resolvent:

This is some kind of behavior of Android fragments

If any fragments are added to the XML layout, the fragments on this activity cannot be deleted. However, if all fragments are added dynamically, it will work normally

Strange, isn't it?

For reference, see http://groups.google.com/group/android-developers/browse_ thread/thread/b56967e0f147168d

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>