title: Using onConfigurationChanged in a fragment
body: <p>I have this code in a fragment</p>
  
  <pre><code>public class TestOne extends Fragment {
  
      View view = null;
  
      @Override
      public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
  
        LayoutInflater inflater2 = (LayoutInflater)getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          view = inflater2.inflate(R.layout.testone, null); 
  
          Toast.makeText(getActivity(), "Rotate fragment", Toast.LENGTH_SHORT).show();
      }
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          Toast.makeText(getActivity(), "onCreate Fragment", Toast.LENGTH_SHORT).show();
  
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
          view = inflater.inflate(R.layout.testone, null); 
  
          Toast.makeText(getActivity(), "onCreateView fragment", Toast.LENGTH_SHORT).show();
  
          return view; 
      }
  
  }
  </code></pre>
  
  <p>What I'm trying to do is that, when I rotate the phone, I don't want the methods to be executed again. But I want to call again the xml layout, to load the layout-land folder's xml.</p>
  
  <p>This code does not give any error, just does not work and do not understand the reason ..</p>
  
  <p>I'm really interested in doing it using onConfiguratonChanged</p>
  
  <p>I appreciate any help.</p>
  
  <p>Thanks and regards</p>