简体   繁体   English

如何更改android中按钮的样式?

[英]how do I change the style of a button in android?

I want to change the style of a button in an android app. 我想更改Android应用中按钮的样式。 here is a picture that has both kinds of buttons, the one that I have now, and the one that I want to switch to: 这是一幅同时具有两种按钮的图片,一个是我现在拥有的,另一个是我想要切换到的:

在此处输入图片说明

the kinds of buttons that I am using now, look like any of the letters on that keyboard. 我现在使用的各种按钮,看起来就像键盘上的任何字母一样。 the ones that I want to use like like the arrows. 我想使用的箭头就像箭头一样。 I would I go about changing this. 我会去改变这个。 I prefer to do it in xml but I can do it in java if that is the only way. 我更喜欢在xml中执行此操作,但是如果那是唯一的方法,则可以在Java中执行。 Thanks 谢谢

change the background of the Button to a png image with arrows! 将按钮的背景更改为带有箭头的png图像! in XML use android:background="@drawable/yourimage" 在XML中使用android:background =“ @ drawable / yourimage”

To get more sophisticated control check here, 要在此处进行更复杂的控制检查,

Standard Android Button with a different color 具有不同颜色的标准Android按钮

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM