title: Dynamic Android Button Styling
body: <p>I want to style a button in java. Need to place a background Image and Apearance Changes. </p>
  
  <p>But its not picking up the style: </p>
  
  <pre><code>LinearLayout linearLayout = (LinearLayout)findViewById(R.id.dynamicpan);
  Button btn = new Button(this,null,R.style.productButton); 
  btn.setText(arrProducts[i].toString());
  btn.setBackgroundResource(R.drawable.button_style);
  linearLayout.addView(btn); 
  
  
   &lt;style name="productButton"&gt;
     &lt;item name="android:textColor"&gt;#FFFFFF&lt;/item&gt;
     &lt;item name="android:textSize"&gt;25sp&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>Can anyone please help me out to fix this issue?</p>