title: Is there a layout configuration qualifier for picture-in-picture (pip) mode layouts
body: <p>I have implemented pip for my app. </p>
  
  <p>I note that in the <a href="https://developer.android.com/guide/topics/ui/picture-in-picture.html" rel="noreferrer">Picture-in-picture support documentation</a> it is suggested that</p>
  
  <pre><code>android:configChanges=
      "screenSize|smallestScreenSize|screenLayout|orientation"
  </code></pre>
  
  <p>is added to the manifest. This has the unwanted effect of preventing the activity lifecycle firing when the app goes into pip mode. and I want the activity - and therefore the layout - to be recreated. </p>
  
  <p>Simple, I just don't use that line.</p>
  
  <p>So now my activity is created and the layout inflated. Only Android is now inflating <code>&lt;layout&gt;-small.xml</code>. Now this is a better option than inflating the 'normal' layout but it's still far too too big a layout for pip mode. (small screens - at least 426dp x 320dp as stated in the <a href="https://developer.android.com/guide/practices/screens_support.html" rel="noreferrer">documentation</a> - pip is MUCH smaller than that.</p>
  
  <p>So my question is - is there an, as yet, undocumented layout configuration qualifier for pip size layouts, or do I have to tweak my small layout to make sure everything sits in the middle and so can be seen (not a very satisfactory solution).  </p>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>There <strong>is</strong> a qualifier <code>-pip</code>  i.e. <code>&lt;layout&gt;-pip.xml</code>, which I found by accident, that compiles without the error "invalid resource directory name". Good times. </p>
  
  <p>BUT Android still inflates the <code>-small</code> layout when going into pip mode. Bad times</p>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have ended up implementing this by creating additional reduced layouts which I load in <code>onCreate</code>after checking <code>isInPictureInPictureMode()</code>. It's not my ideal solution but until I have a better one it is what it is. </p>