android - Fragment flashes when removing -
if remove fragment after setting it's view visibility view.gone/ view.invisible removal of fragment causes view flash again before removing. how can avoid this
fragment.getview().setvisibility(view.invisible);
afterwards:
ft.remove(fragment); ft.commitallowingstateloss();
i not using hide because animation myself , @ onanimationend commit remove.
then view of fragment flashes , removed.
i did setting height 0 , invisible instead of view.gone:
fragment.getview().setvisibility(view.invisible); viewgroup.layoutparams params = fragment.getview().getlayoutparams(); params.height = 0; fragment.getview().setlayoutparams(params);
Comments
Post a Comment