工具类
柯嘉少
这个作者很懒,什么都没留下…
展开
-
对话框工具类
public class DialogUtil { /** * 创建消息对话框 * * @param context 上下文 必填 * @param title 标题 必填 * @param message 显示内容 必填 * @param btnName 按钮名称 必填 * @param listener 监听原创 2017-08-04 11:17:03 · 170 阅读 · 0 评论 -
日志打印工具类
public class LogUtils { //private static final int LOG_LEVEL = 6; //我在这里做了调整,改成public,方便从外部设值,控制 public static int LOG_LEVEL = 6; private static final int VERBOSE = 5; private static原创 2017-08-04 11:29:58 · 238 阅读 · 0 评论 -
dip与px相互转换工具类
public class DensityUtil { /** * 根据手机分辨率将dip单位转换为px单位 * @param context 上下文 * @param dpValue 相对像素dip * @return */ public static int dip2px(Context context,float dpValue)原创 2017-08-04 11:34:20 · 258 阅读 · 0 评论 -
SharedPreference工具类
public class SharedPreferencesHelper { private static final String FILE_NAME = "app_data"; private static SharedPreferences mSharedPreferences;// 单例 private static SharedPreferencesHe转载 2017-08-04 11:47:11 · 172 阅读 · 0 评论 -
通信录工具类
对通信录的简单增删改查工具类:import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import android.content.ContentResolver;import android.content.ContentUris;import andro转载 2017-08-04 17:40:30 · 195 阅读 · 0 评论 -
正则验证手机号码
public class VerifyUtil { /** * 移动:134、135、136、137、138、139、150、151、152、157(TD)、158、159、178(新)、182、184、187、188 * 联通:130、131、132、152、155、156、185、186 * 电信:133、153、170、173、177、180、181、189原创 2018-04-02 18:11:52 · 956 阅读 · 0 评论 -
去应用商店给app评分
/** * 作者:jiashao.ke on 2018/3/30 17:38 * 邮箱:[email protected] * 跳转到应用商店评分 */public class MarketUtils { /** * 启动到app详情界面 * * @param context * * @param appPkg *原创 2018-04-02 18:16:53 · 2213 阅读 · 0 评论 -
android应用权限检测工具类
public class PermissionUtil { public static final int REQUEST_PERMISSION = 0x001; //app需要的全部危险权限在这里定义 public static final String[] ALL_PERMISSIONS = new String[]{ Manifest.permi原创 2018-04-02 18:19:23 · 2911 阅读 · 0 评论 -
获取屏幕相关信息工具类
public class ScreenUtils { private ScreenUtils() { throw new UnsupportedOperationException("u can't instantiate me..."); } /** * 获取屏幕的宽度(单位:px) * * @return 屏幕宽 */原创 2018-04-02 18:24:06 · 179 阅读 · 0 评论