title: Setting different resource values using values folder for different API versions
body: <p>I have been noticing a crash on Android 6 with error message - "A/OpenGLRenderer: Error: Ambient Vertex Buffer overflow!!!" Setting hardware accelerated to false for an activity in manifest file solves the problem, but affects the performance of the app (results into slower app).</p>
  
  <p>I want to just set the value to false only if android version is 23 (android M) and not otherwise. Here is how I approached it:</p>
  
  <p><strong><em>Android Manifest file:</em></strong></p>
  
  <pre><code>&lt;activity
  android:name=".MainActivity"
  android:hardwareAccelerated="@bool/hardwareAcceleratedValue"&gt;
  </code></pre>
  
  <p><strong><em>res/values/bool.xml</em></strong></p>
  
  <pre><code>&lt;resources&gt;
      &lt;bool name="hardwareAcceleratedValue"&gt;true&lt;/bool&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p><strong><em>res/values-v23/bool.xml</em></strong></p>
  
  <pre><code>&lt;resources&gt;
      &lt;bool name="hardwareAcceleratedValue"&gt;false&lt;/bool&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>With this, I was noticing slower performance on Android M devices (which was expected), but also on devices with Android 9. So I went ahead and created another folder for android 9 and added the file to it with "hardwareAcceleratedValue" as true and the performance was faster.</p>
  
  <p><strong><em>Question</em></strong> - </p>
  
  <p>For android API's other than v23, shouldn't android read the "hardwareAcceleratedValue" value from res/values/bool.xml? Or will I have to create separate folders for every android API and create a bool.xml file within it i.e. res/values-v28/bool.xml or res/values-v27/bool.xml?</p>
  
  <p>How can I just set "hardwareAcceleratedValue" to false only for Android-M or less and true for all versions beyond android-M?</p>