h4de5ing / androidcommon Goto Github PK
View Code? Open in Web Editor NEW基于Android系统Api封装常用工具类
Home Page: https://19code.com
基于Android系统Api封装常用工具类
Home Page: https://19code.com
谢谢博主提供一个工具类,自己也写过,没有博主分类这么细致。非常感谢,但由于只用到部分功能,因此拷贝了部分代码到我们项目中。
建议每个方法加上readme 中的注释。
https://github.com/h4de5ing/AndroidCommon/blob/master/library/src/main/java/com/code19/library/StringUtils.java#L142
这一行 str.trim().length() == 0 || "".equals(str); 后面那个或语句可以忽略掉。
L.java 不能打长日志阿 老只有一半阿 坑爹阿
sdk24以下的继续沿用原有方法,大于等于24的可以交给开发者自己处理,不太会用github,不知道怎么提pullrequest ;p
NetUtlis.class类,出现错误,建议还是做一下是否为null的判断
public static boolean isWiFi(Context cxt) {
ConnectivityManager cm = (ConnectivityManager) cxt.getSystemService(Context.CONNECTIVITY_SERVICE);
// wifi的状态:ConnectivityManager.TYPE_WIFI
// 3G的状态:ConnectivityManager.TYPE_MOBILE
return cm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI;
}
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.