if I remove a fragment after setting it's View to Visibility View.GONE/ View.INVISIBLE the removal of the fragment causes the View to flash again before removing. how can i avoid this
fragment.getView().setVisibility(View.INVISIBLE);
Afterwards:
ft.remove(fragment);
ft.commitAllowingStateLoss();
I am not using hide because I do the Animation by myself and at onAnimationEnd I do commit the remove.
Then the View of the Fragment flashes and then is removed.
