title: Fragment Android refresh
body: <p>I'm implementing fragment in android, i be faced issue:</p>
  
  <pre><code>public Fragment getItem(int num) {
              switch (num)
              {
                  case 0:
                      NewFragment newFragment = new NewFragment();
                      //newFragment.refresh();
                      return newFragment;
                  case 1:
                      HotFragment hotFragment = new HotFragment();
                      //hotFragment.refresh();
                      return hotFragment;
                  default: return new ContentFragment();
              }
  
          }
  </code></pre>
  
  <p>When i click button in tab host, it call "onCreateView" and "onViewCreated" only once. But with my purpose can i call back function to handle every time i call new NewFragment() ?</p>
  
  <pre><code>@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
      // Inflate the layout for this fragment
      return inflater.inflate(R.layout.fragment_new, container, false);
  }
  
  @Override
  public void onViewCreated(View view, Bundle savedInstanceState) {
      super.onViewCreated(view, savedInstanceState);
      //some config
  }
  </code></pre>
  
  <p>I did try onDetach(), onAttach(), onResume(), but it not work by my purpose</p>