Refresh or force redraw the fragment

后端 未结 8 1673
失恋的感觉
失恋的感觉 2020-11-30 02:10

I have a fragment that inflates an xml layout. My requirement is to update the text size on all my views inside my fragment when my Activity is resumed. I tried



        
8条回答
  •  心在旅途
    2020-11-30 02:47

    Use the following code for refreshing fragment again:

    FragmentTransaction ftr = getFragmentManager().beginTransaction();                          
    ftr.detach(EnterYourFragmentName.this).attach(EnterYourFragmentName.this).commit();
    

提交回复
热议问题