kyleduo / SwitchButton

A cute widget of Switch Button for you to create beautiful and friendly UI.
4.72k stars 866 forks source link

如何给button加上一个边框呢 #111

Closed PeterXiaosa closed 6 years ago

PeterXiaosa commented 6 years ago

想请问下SwitchButton如何给控件边缘加1px的线条包围住控件呢?这样的话可以层次分明一些

PeterXiaosa commented 6 years ago

后来我自己找到了办法。用backdrawable和thumdrawable自己在xml中写属性加stroke,这样就可以实现了,希望可以帮到其他人。

PeterXiaosa commented 6 years ago

finish