Friday, 30 August 2013

Childfragment background color (magically) changed

Childfragment background color (magically) changed

So, I have ViewPager with 2 fragments, fragment 1 (DomestikParentFragment)
has 2 child fragment, DomestikFragment and DaftarPenerbanganFragment.
DaftarPenerbanganFragment is a ListFragment and DomestikFragment is just a
Fragment. In DaftarPenerbanganFragment, I change color between odd row and
even row. Odd row is yellow, even row just white.
So the fragment I have first in DomestikParentFragment is
DomestikFragment, then I pressed button in DomestikFragment to replace
that fragment with DaftarPenerbanganFragment.
This happened:
1) I pressed button in DomestikFragment to replace it with
DaftarPenerbanganFragment and then pressed back to pop the stack. I did
that few times.
2) At sometime, the background color in DomestikFragment was changed to
yellow. And then I did number 1) again and at some time, the background
was changed back to white.
I just don't understand why this happened.
Image of DomestikFragment before event 1) with white background:

Image of DaftarPenerbanganFragment that's shown after I click that blue
button "Cari penerbangan":

Image of DomestikFragment after I did event number 1) a few times:

PS: do i need to post the code? Thanks..

No comments:

Post a Comment