maoruibin / onedrawable Goto Github PK
View Code? Open in Web Editor NEW:pencil2: Use only one image to set a background with a click effect for the View
License: Apache License 2.0
:pencil2: Use only one image to set a background with a click effect for the View
License: Apache License 2.0
Drawable drawable = OneDrawable.createBgColor(this, R.color.white); 默认背景都变色了。
//强迫症,看到
//设置背景推荐加入这个工具类
public static void setBackground(View view, Drawable drawable) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
//大于API-16
view.setBackground(drawable);
} else {
//小于API-16
view.setBackgroundDrawable(drawable);
}
}
Drawable 不一定全是从 资源ID拿到的 , 让该库更加完善
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.