How to create a background selector that has Kitkat style for pre-Lollipop, and native one for Lollipop and above?

此生再无相见时 提交于 2019-12-10 11:49:15

问题


This question is short.

How do I set a background for buttons and such, that will have the native look&feel of Lollipop (ripple etc...) for Lollipop and above, and Kitkat style for Kitkat and below?

I ask this to make this library look better:

https://github.com/AndroidDeveloperLB/MaterialPreferenceLibrary


回答1:


I think this is possible by declaring the different 'styles' in the corresponding 'values' folder. I think the following link can help:

http://developer.android.com/training/material/compatibility.html#Theme



来源:https://stackoverflow.com/questions/30461770/how-to-create-a-background-selector-that-has-kitkat-style-for-pre-lollipop-and

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