Refreshing a view inside a fragment

后端 未结 5 835
太阳男子
太阳男子 2020-12-23 22:20

I have searched the numerous questions that look like this one, but haven\'t found my answer in any of them.

I have an activity that has 3 tabs accessible through th

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-23 23:09

    The fastest solution working for me:

     @Override
        public void onPause() {
            super.onPause();
            if (isRemoving() && fragmentView != null) {
                ((ViewGroup) fragmentView).removeAllViews();
            }
        }
    

提交回复
热议问题