随笔分类 -  Android开发

摘要:package net.utils; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; public class NetCheck { pub 阅读全文
posted @ 2021-02-09 19:37 FlowLiver 阅读(176) 评论(0) 推荐(0)
摘要:1.准备工作 下载adb https://developer.android.google.cn/studio/releases/platform-tools?hl=en 如图,我是win10版本,所以下载第一个 下载后解压并把这个目录配置到环境变量中 打开终端,输入adb,如图就是成功了 打开手机 阅读全文
posted @ 2021-02-02 23:00 FlowLiver 阅读(1842) 评论(0) 推荐(0)
摘要:首先定义一个实现类 public class OnViewGlobalLayoutListener implements ViewTreeObserver.OnGlobalLayoutListener { private int maxHeight = 500; private View view; 阅读全文
posted @ 2021-02-01 11:41 FlowLiver 阅读(1277) 评论(0) 推荐(1)
摘要:/** * 弹窗的一些配置 * @param activity * @param dialog * @param canCancel 是否可以点击外部取掉 * @param isBgDark 背景是否不变暗 0为不 1为是 */ public void showDialog(Activity act 阅读全文
posted @ 2021-02-01 11:33 FlowLiver 阅读(1572) 评论(0) 推荐(0)
摘要:/** * 获取屏幕宽度 * @param context * @return */ public static int getScreenWidth(Context context) { WindowManager windowManager = (WindowManager) context.g 阅读全文
posted @ 2021-02-01 11:01 FlowLiver 阅读(187) 评论(0) 推荐(0)
摘要:path.store.file=E\:\\files\\codesrc\\signs\\testsigns.jks path.alias.password=Flower path.alias=Flower path.store.password=Flower signingConfigs { rel 阅读全文
posted @ 2021-01-31 15:37 FlowLiver 阅读(145) 评论(0) 推荐(0)
摘要:1.将要混淆的字符集txt文件放在proguard-rules.pro的同级目录下:如图: 2.在proguard-rules.pro下加入三行: -obfuscationdictionary my_dict.txt -classobfuscationdictionary my_dict.txt - 阅读全文
posted @ 2021-01-31 12:49 FlowLiver 阅读(337) 评论(0) 推荐(0)
摘要:ContextCompat.getColor(context, R.color.my_color) 阅读全文
posted @ 2021-01-29 19:46 FlowLiver 阅读(69) 评论(0) 推荐(0)
摘要:1.view.post(Runnable action textView.post( new Runnable() { @Override public void run() { textView.setText("更新tv"); //还可以更新其他的控件 imageView.setBackgrou 阅读全文
posted @ 2021-01-29 15:02 FlowLiver 阅读(536) 评论(0) 推荐(0)
摘要:public class ProUtils { /** 直接调用这个方法即可 **/ public static boolean isNetOk(Context context) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { retur 阅读全文
posted @ 2021-01-28 19:04 FlowLiver 阅读(120) 评论(0) 推荐(0)