Style.xmlファイル(AppThemeは私のアプリのテーマであり、それはmateriallightdarkactionbarのテーマを継承している) アンドロイドスタジオのすべてのボタンのスタイルを変更するには?
<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Material.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:colorForeground">@color/holo_orange_light</item>
<item name="android:buttonStyle">@style/newbuttonstyle</item>
</style>
<style name="newbuttonstyle" parent="@android:style/Widget.Button">
<item name="android:backgroundTint">#acd9e6</item>
</style>
</resources>
私は電卓を設計していますし、これはそれのためのキーパッドです.....ではなく、個別に設定しますすべてのボタンの背景色合いstyle.xmlを使用して、すべてのボタンのスタイルを変更したいのですが...できますか?この中
は私がのButtonStyleを使用していますが、まだ私が自分のアプリケーションのコード上で使用しています
<item name="android:buttonStyle">@style/newbuttonstyle</item>
可能な重複します(http:/を/stackoverflow.com/questions/2410836/how-do-i-apply-a-style-to-all-buttons-of-an-android-application) –
これを試す:http://stackoverflow.com/questions/17192104/change-button-in-the-whole-application –
あなたは、ボタン自体のスタイルを明示的に言わなければならないと言っています。- @ style/newbuttonstyle
–