安卓:自定义按钮形状 [英] Android: custom button shape
问题描述
我想实现包含不同的形状各种按键的自定义控制器。我不知道我该如何与Android实现这一目标。
I'm trying to achieve a custom controller containing of various buttons in different shapes. I'm wondering how I can achieve this with Android.
结果应该类似于这样的,在每一个颜色是不同的按钮。
The result should look similar like this, where every color is a different button.
我想我一定要继承查看
所以请不要写,作为一个答案;-),请给一些有条不紊的步骤,有什么需要实现,如绘画,感应触摸等或者(如果存在的话)指向我的一些例子。
I suppose I have to subclass View
so please don't write that as an answer ;-) Please give some methodical steps what's needs to be implemented, like drawing, sensing touches, etc or maybe point me to some examples (if exist).
感谢
推荐答案
我发现的这个文件解释所有的细节,并有链接指向相关的主题。
I found this document explaining everything in detail and having links pointing to related topics.
这篇关于安卓:自定义按钮形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!