title: How do I create ColorStateList programmatically?
body: <p>I am trying to create a <code>ColorStateList</code> programatically  using this: </p>
  
  <pre><code>ColorStateList stateList = new ColorStateList(states, colors); 
  </code></pre>
  
  <p>But I am not sure what are the two parameters.</p>
  
  <p>As per the documentation:</p>
  
  <blockquote>
  <pre><code>public ColorStateList (int[][] states, int[] colors) 
  </code></pre>
    
    <p>Added in API level 1</p>
    
    <p>Creates a ColorStateList that returns the specified mapping from states to colors. </p>
  </blockquote>
  
  <p>Can somebody please explain me how to create this?</p>
  
  <p>What is the meaning of two-dimensional array for states?</p>