Java でボタンのスタイルを設定したい。背景画像と外観の変更を配置する必要があります。
しかし、それはスタイルを拾っていません:
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);
<style name="productButton">
<item name="android:textColor">#FFFFFF</item>
<item name="android:textSize">25sp</item>
</style>
誰でもこの問題を解決するために私を助けてもらえますか?