本文主要是介绍Android - Buttons,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
》 A button consists of text or an icon (or both text and an icon) that communicates what action occurs when the user touches it.
With text and an icon, using the Button
class with the android:drawableLeft
attribute。
》The appearance of your button (background image and font) may vary from one device to another, because devices by different manufacturers often have different default styles for input controls.
》Styling Your Button
If you want to truly redefine the appearance of your button, you can specify a custom background. Instead of supplying a simple bitmap or color, however, your background should be a state list resource that changes appearance depending on the button's current state.
You can define the state list in an XML file that defines three different images or colors to use for the different button states.
这篇关于Android - Buttons的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!