04 2017 档案

ListView选中状态背景
摘要:android:listSelector="@drawable/xian" 阅读全文

posted @ 2017-04-18 14:29 yaolunhui 阅读(101) 评论(0) 推荐(0) 编辑

取消GridView/ListView item被点击时的效果
摘要:方法一,在控件被初始化的时候设置 方法二,在布局文件中设置listSelector属性 当然也可以定制化自己想要的效果。 推荐使用方法二,解耦逻辑代码与布局文件。 阅读全文

posted @ 2017-04-17 10:06 yaolunhui 阅读(236) 评论(0) 推荐(0) 编辑

Activity取消过渡动画
摘要:很多手机都会自带一些Activity切换动画,项目中如果我们需要禁用掉系统Activity切换的动画,可以使用如下方法: 一、重写Activity的Them中的windowAnimationStyle相关属性,并保存在res/values/styles.xml 二、在不想有动画的Activity上设 阅读全文

posted @ 2017-04-14 14:48 yaolunhui 阅读(3795) 评论(0) 推荐(0) 编辑

gridview划线
摘要:gridview设置划线颜色 item设置背景色 阅读全文

posted @ 2017-04-11 18:54 yaolunhui 阅读(180) 评论(0) 推荐(0) 编辑

获取SD卡路径
摘要:public static String getSDPath(){ File sdDir = null; boolean sdCardExist = Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_M 阅读全文

posted @ 2017-04-06 15:14 yaolunhui 阅读(136) 评论(0) 推荐(0) 编辑

保存Bitmap图像
摘要:/** * 保存文件 * @param bm * @param fileName * @throws IOException */ public void saveFile(Bitmap bm, String fileName) throws IOException { String path =  阅读全文

posted @ 2017-04-06 15:14 yaolunhui 阅读(155) 评论(0) 推荐(0) 编辑

adb not responding. if you'd like to retry then please manually kill adb.exe and click 'restart',restart
摘要:最近Android Studio老是提示一个问题,adb not responding. if you'd like to retry then please manually kill adb.exe and click 'restart',restart没用,kill-server和start- 阅读全文

posted @ 2017-04-06 12:54 yaolunhui 阅读(543) 评论(0) 推荐(0) 编辑

弹出异地登录dialog
摘要:final AlertDialog dlg = new AlertDialog.Builder(LoginActivity.this).create();dlg.show();Window window = dlg.getWindow();if(window!=null){ window.setCo 阅读全文

posted @ 2017-04-01 09:16 yaolunhui 阅读(130) 评论(0) 推荐(0) 编辑

导航