08 2017 档案

摘要:/** * 获取当前进程名 * * @param context * @return 进程名 */ public static String getprocessName(Context context){ String processName=""; ActivityManager manager = (... 阅读全文
posted @ 2017-08-22 13:36 段合江 阅读(1280) 评论(0) 推荐(0)
摘要:1.Bitmap 1.1非静态方法 public void recycle()——回收位图占用的内存空间,把位图标记为Dead public final boolean isRecycled() ——判断位图内存是否已释放 public final int getWidth()——获取位图的宽度 p 阅读全文
posted @ 2017-08-14 16:15 段合江 阅读(13500) 评论(0) 推荐(1)
摘要:public void onViewClicked(View view) { switch (view.getId()) { case R.id.bt1: img1.setColorFilter(getResources().getColor(R.color.color3)); ... 阅读全文
posted @ 2017-08-12 16:34 段合江 阅读(594) 评论(0) 推荐(0)
摘要:导入 2.下载jar 地址:glide.jar 基本使用 2. 设置预加载和加载失败的图片及缓存策略 显示圆形图片 定义转化圆形的类 继承自BitmapTransforation 在RequestOptions中配置该类 显示圆角图片 定义转化圆形的类 继承自BitmapTransforation 阅读全文
posted @ 2017-08-12 15:49 段合江 阅读(1986) 评论(0) 推荐(0)
摘要:Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_LAUNCHER); ComponentName cn = new ComponentName("com.example.timer", "com.example.... 阅读全文
posted @ 2017-08-12 13:22 段合江 阅读(359) 评论(0) 推荐(0)
摘要:简介: 本篇博客主要介绍的是如何使用RecyclerView实现图片水平方向自动循环(跑马灯效果) 效果图: 思路: 1.准备m张图片 1.使用Recyclerview实现,返回无数个(实际Interge.MAXVALUE)item,第n个item显示第n%m张图片 3.使用recyclerview 阅读全文
posted @ 2017-08-03 10:42 段合江 阅读(2373) 评论(0) 推荐(1)