title: Android default density values when the current is missing
body: <p>I had a question about densities and how Android chooses the right <code>values</code> folder for the current density. I think I've found the answer but I am not completely sure so I'll post what I've found. At least, this post may help someone.</p>
  
  <p>For example, if I only include folders <code>values</code>, <code>values-hdpi</code> and <code>values-xxhdpi</code>, what does Android do when the current density is <code>xhpdi</code>?</p>
  
  <p>It seems that Android looks for a higher density folder, so it will use <code>values-xxhdpi</code>.</p>
  
  <p>And what happens when the current density is <code>xxxhdpi</code>?</p>
  
  <p>It seems that, if Android can't find a higher density folder, it looks for a lower one, so it will use <code>values-xxdpi</code> too.</p>
  
  <p>Android will never use the default <code>values</code> folder for a value that is defined in some specific <code>values-*dpi</code> folder.</p>
  
  <p>To sum up, supposing I only have <code>values</code>, <code>values-xxhdpi</code> and <code>values-hdpi</code>:</p>
  
  <ul>
  <li>Values in <code>values-hdpi</code> will be used for devices with densities <code>ldpi</code>, <code>mdpi</code> and <code>hdpi</code>.</li>
  <li>Values in <code>values-xxhdpi</code> will be used for devices with densities <code>xhdpi</code>, <code>xxhdpi</code>and <code>xxxhdpi</code>.</li>
  <li>Values in <code>values</code> won't be ever used if they are defined in any <code>values-*dpi</code> folder.</li>
  </ul>
  
  <p>Let me know what you think about this.</p>
  
  <p>Thanks</p>