Reputation: 3448
The problem is a bit weird and complex - sometimes (it is not deterministic or I do not know the cause) some of my fragments are not showing up in transaction.
I checked everything twice, and it seems OK - fragment is correctly added before, is not null etc., has field mHidden
set to true
before and to false
after the transaction, but all I see is an empty place.
What could be wrong?
To be more precise about the problem - I'm managing many fragments in one Activity
(up to 25) at the same time, and the transactions hide / show many of them at once. What's more, I have 4 fragments added to the same layout holder (FrameLayout
), and switching their visibility - but I don't think it may be the cause.
I'm starting to hate Android...
Upvotes: 1
Views: 663
Reputation: 3448
OK, it's wonderful how often you come up with a solution while showing your problem to the others - the problem here was in hide / show animations - there was a use case when I was hiding a fragment with some kind of animation (scale to 0.0, fade, etc.) and later (special case) show it without an enter reverse animation (as an optimization) - fragment WAS shown, but remain scaled to 0 or faded.
Upvotes: 1