0

I have a typical setup where on the left there is a listfragment displaying categories while on the right the listfragement displays details.

For example:

when category A is selected:

LEFT  RIGHT
A     A1
B     A2
C

when category B is selected:

  LEFT  RIGHT
    A     B1
    B     
    C

Now when switching between A and B on the left the right side updates correctly showing 2 lines for A1,A2 and exactly one line for B1. (clearing the A2)

Now I like to give the option to look at different data of A and B like a1 (lower a) where A only has a1 (not a1 and a2, like for the A1, A2)

I do this by replacing the right listfragment from the one displaying the CAPS A1,A2, B2... to a second listfragment displaying the lower a1, b2...

The problem is when replacing the right listfragmentCAPS into listfragmentLOWER the right area does not get cleared and on sees on the screen:

LEFT  RIGHT (with the listfragmentCAPS)
A     A1
B     A2
C

switching to listfragmentLOWER

LEFT  RIGHT (with the listfragmentLOWER)
A     a1
B     A2  <- this is a left over of the listfragmentCAPS
C

The **A2** from listfragmentCAPS is still visible even though listfragmentLOWER has now replaced it. All other screen content of listfragmentCAPS is also still visible (like checkboxes) while listfragmentLOWER does not have any checkboxes.

What would be the best way to clear the area before listfragmentLOWER shows its content?

ps I hope this long text description is clear :-) Many thanks

user387184
  • 10,953
  • 12
  • 77
  • 147

1 Answers1

0

If you use static fragments, then you have to replace them by dynamic ones. See this post

Community
  • 1
  • 1
Fabien R
  • 685
  • 1
  • 8
  • 24