![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Android
NoBug_Android
这个作者很懒,什么都没留下…
展开
-
自定义Dialog中一些style
@color/transparent true false true @color/transparent true stateAlwaysVisible原创 2016-12-16 11:40:49 · 548 阅读 · 0 评论 -
魅族、小米、华为等国产手机动态请求权限崩溃问题
在国产手机上经常碰到用户明明已经拒绝权限,check时返回的却是true,接着就崩溃了,这时候你不仁,就别怪我不义了,直接try{}catch(){},以相机权限为例if (permission.granted) { // 用户已经同意该权限,魅族等国产手机即使用户拒绝权限仍然会走这里原创 2017-12-05 11:39:16 · 1542 阅读 · 0 评论 -
Android开发资源(二)
抽屉菜单控件https://github.com/mikepenz/MaterialDrawer视差滑动控件https://github.com/ksoichiro/Android-ObservableScrollView日志https://github.com/orhanobut/logger底部导航栏控件https://github.com/ro原创 2017-11-29 14:45:50 · 257 阅读 · 0 评论 -
Android开发资源(一)
Android studio 设置http://www.cnblogs.com/smyhvae/p/4390905.htmlAndroid studio 插件http://blog.csdn.net/lyj1005353553/article/details/55100563BRVAH(Recyclerview适配器)使用http://www.jianshu.c原创 2017-11-06 20:30:56 · 352 阅读 · 0 评论 -
禁止ScrollView中控件长度发生变化自动滑动
问题:当ScrollView中的子控件长度发生变化时,ScrollView会自动滑动,需要禁掉解决方法:<ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout原创 2017-07-25 15:15:34 · 630 阅读 · 0 评论 -
Android Base64编码出现换行
Base64编码,发现编码后总是有换行,google后发现字符串过长(一般超过76)时会自动在中间加一个换行符,不能使用默认设置,改为NO_WRAP就可以了android.util.Base64.encodeToString(string.getBytes(), Base64.NO_WRAP);CRLF 这个参数看起来比较眼熟,它就是Win风格的换行符,意思就是使用CR LF这一对作为转载 2017-04-20 19:39:33 · 1996 阅读 · 0 评论 -
软键盘显示搜索及监听
EditText需要设置两个属性:imeOptions = actionSearch和singleLine = true//搜索监听etSearch.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEdito原创 2017-03-15 10:10:26 · 312 阅读 · 0 评论 -
Vitamio自定义控制器MediaController样式
先看一下效果图比自带控制器多出上面菜单,并将视频名称改到上面显示先是布局文件 mymdiacontroller<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"原创 2017-02-24 14:38:42 · 4029 阅读 · 2 评论 -
点击穿透
底部菜单点击空白处时,点击事件传递到下一界面,这时重写点击控件的setOnTouchListener方法,将返回值改true原创 2017-02-15 17:20:02 · 391 阅读 · 0 评论 -
PhotoView单击事件
mPhotoView.setOnPhotoTapListener(new PhotoViewAttacher.OnPhotoTapListener() { @Override public void onPhotoTap(View view, float x, float y) { finish(); } @Override public void on原创 2017-02-23 16:19:56 · 708 阅读 · 0 评论 -
Error:Plugin with id 'com.github.dcendents.android-maven' not found.
Error:Plugin with id 'com.github.dcendents.android-maven' not found.错误是因为maven-plugin版本低导致,在项目下面的build.grade添加两行代码//这行需要maven-gradle最新版本classpath 'com.github.dcendents:android-maven-gradle-pl原创 2017-02-23 16:09:31 · 402 阅读 · 0 评论 -
java.lang.IndexOutOfBoundsException: Inconsistency detected. RecyclerView
快速滑动,并且切换数据,会导致崩溃,这个bug是RecyclerView本身存在的,网上也有很多解决方法,但我试都没有效果,后来发现try catch RecyclerView的动画会捕获这个异常,于是自定义LinearLayoutManager完美解决。public class MyLinearLayoutManager extends LinearLayoutManager { pub...原创 2018-06-05 09:42:40 · 598 阅读 · 0 评论