Custom Shape Button Android

ぃ、小莉子 提交于 2019-12-03 20:33:35

问题


I have to address this type of views which has buttons below example. http://www.planet1107.net/blog/custom-shape-uibutton-tutorial/

It is in the iOS. so is there any way to make it in Android. I also have to give click events on all of those buttons.


回答1:


I would recommend just exporting these custom images to pngs. Then adding the pngs to your Android project and simply referencing them in the code or XML. Then on a click event you can simply change the icon to indicate that it has been clicked and if the user clicks on it one more time change it back.

This will also ensure that the Android images look identical to the iOS ones.



来源:https://stackoverflow.com/questions/36793535/custom-shape-button-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!