title: Could not find Fragment constructor, when app comes back from landscape Camera
body: <blockquote>
    <p>Fatal Exception: java.lang.RuntimeException
    Unable to start activity ComponentInfo{com.example.app1/com.example.app1.MainActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.example.app1.ui.template.TemplateFragment: could not find Fragment constructor</p>
  </blockquote>
  
  <p>When I take a photo in landscape orientation (everything is well in portrait mode) and save it from Camera, this error occurs. 
  Orientation of my app is only portrait. </p>
  
  <p>Constructor of TemplateFragment:</p>
  
  <pre class="lang-java prettyprint-override"><code>public TemplateFragment(){
  
  } 
  
  public static  TemplateFragment newInstance(int equipmentId) {
          Bundle args = new Bundle();
          args.putInt("equipmentId", equipmentId);
          TemplateFragment f = new TemplateFragment();
          f.setArguments(args);
          return f;
      }
  </code></pre>
  
  <p>Error occurs in MainActivity</p>
  
  <pre class="lang-java prettyprint-override"><code>        setTheme(R.style.AppTheme_NoActionBar);
          super.onCreate(savedInstanceState); //on this line
          setContentView(R.layout.activity_main);
  </code></pre>