title: android button customized color and round corner
body: <p>I am making a drawing app where the users can choose a custom color. After choosing the color, the customBtn would change its color to the chosen color by the following code:</p>
  
  <pre><code>     customBtn.setBackgroundColor(Color.argb(alphaSeekBar.getProgress(), redSeekBar.getProgress(), 
          greenSeekBar.getProgress(), blueSeekBar.getProgress()));
  </code></pre>
  
  <p>However, this makes the button to be squared-corner. </p>
  
  <p>I would like it to be round-corner and when pressed, it become grey in color.</p>
  
  <p>There is <code>selector.xml</code> already exist and shown as follows, but how could I incorporate all the things together such that </p>
  
  <ol>
  <li>it will show custom color when not pressed, round-cornered, and </li>
  <li>when pressed it become grey (and maintain round-cornered)?</li>
  </ol>
  
  <h2>Selector:</h2>
  
  <p>
  </p>
  
  <pre><code>&lt;item android:state_pressed="true" &gt;         
      &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt; 
          &lt;stroke android:width="2dp" android:color="@color/black" /&gt;
          &lt;solid android:color="@color/grey"/&gt;
          &lt;padding android:left="5dp" android:top="2dp" 
              android:right="5dp" android:bottom="2dp" /&gt; 
          &lt;corners android:radius="5dp" /&gt; 
      &lt;/shape&gt;    
  &lt;/item&gt;
  
  &lt;item&gt;
      &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt; 
          &lt;stroke android:width="2dp" android:color="@color/black" /&gt;
          &lt;solid android:color="@color/???-- how to amend---??"/&gt;
          &lt;padding android:left="5dp" android:top="2dp" 
              android:right="5dp" android:bottom="2dp" /&gt; 
          &lt;corners android:radius="5dp" /&gt; 
      &lt;/shape&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p></p>
  
  <h2>EDIT: to set round-corner programmatically, as customerized color is not static, user can change the customerized color upon request</h2>
  
  <pre><code> customColorCode = Color.argb(alphaSeekBar.getProgress(), redSeekBar.getProgress(), 
           greenSeekBar.getProgress(), blueSeekBar.getProgress());         
  
  
  
   RoundRectShape rs = new RoundRectShape(new float[] { 10, 10, 10, 10, 10, 10, 10, 10}, null, null);
   ShapeDrawable sd = new ShapeDrawable(rs);
   customBtn.setBackgroundDrawable(sd);
   customBtn.setBackgroundColor(customColorCode);
  </code></pre>
  
  <h2>Programmatically problem:</h2>
  
  <p>The button before choosing customerized color is showing round corner perfectly, set after choosing the customerized color it is then back to squared-color, possibly it is because the setBackgroundColor line is put at the last code. Yet i have tried move it up and yet still being squared color. How can this be modified?</p>
  
  <p>Thanks!</p>