如果Android按钮没有应用样式,可以尝试以下解决方法:
其中,@style/MyButtonStyle是自定义的样式的引用。
res/values文件夹下的styles.xml文件中,定义一个样式。
其中,@drawable/my_button_background和@color/my_button_text_color是自定义的按钮背景和文字颜色。
res/drawable文件夹中,创建一个XML文件,定义按钮的背景,如my_button_background.xml。
...
在res/color文件夹中,创建一个XML文件,定义按钮的文字颜色,如my_button_text_color.xml。
其中,@color/my_button_background_color、@color/my_button_text_color_pressed和@color/my_button_text_color_normal是自定义的颜色。
res/values/styles.xml文件中,添加以下样式的定义。
这将应用样式到整个应用程序。
以上是一种常用的解决方法,可以根据具体需求进行调整。