1

Topic: Fragment add/replace

Faced the strange piece.
In container FrameLayout dynamic I put some fragments

((Activity) ctx).getFragmentManager ().beginTransaction ().add (fragContainer.getId ();
TemplateFragment.newInstance (...);
"TAG").addToBackStack (null).commit ();

On the first fragment a data entry field and the button, a remaining place empty. And so on this empty place, at mouse click there are artifacts from other fragments (drop down lists and so forth)
If fragments to replace (replace) all like works normally, really the method add () and works?

2

Re: Fragment add/replace

nikomp wrote:

really the method add () and works?

Adds to existing, instead of replaces them? Like logical...

3

Re: Fragment add/replace

wadman;
That adds that logically. A question, why the lower fragment  at a clique for no reason the upper fragment?

4

Re: Fragment add/replace

nikomp wrote:

the Question, why the lower fragment  at a clique for no reason the upper fragment?

Because a fragment it only the container, without user interaction.