![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
android
成都坏蛋
这个作者很懒,什么都没留下…
展开
-
android DialogFragment底部弹出,自定义大小
public class Dlg extends DialogFragment { private View rootView; private int height; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle原创 2016-12-30 13:42:43 · 2050 阅读 · 0 评论 -
ScrollView嵌套EditText 滑动冲突
重写EditText 的方法dispatchTouchEvent例: @Override public boolean dispatchTouchEvent(MotionEvent event) { //让父类不不拦截自己的触摸事件 if (hasFocus()){ getParent().request原创 2017-12-27 14:25:39 · 311 阅读 · 0 评论 -
Glide加载流程分析
https://note.youdao.com/share/?id=0f5a776c6acbd8db8ae879f37c1ff6a9&type=note#/原创 2018-02-01 15:49:40 · 220 阅读 · 0 评论 -
android 消息机制详细全解
转自 cc_wentianandroid 消息机制一直只是使用而没有理解它原理,此篇将分析其原理。什么是android消息机制? 一句话:一个线程无限循环监听并依次处理其他线程的消息,没有消息就释放资源休眠。android消息机制主要类: 1. handler : 处理者,处理消息 。 2. message转载 2018-01-30 16:29:12 · 135 阅读 · 0 评论 -
RecyclerView刷新后自动滚动问题
解决方案:RecyclerViewd如果是在Fragment中使用的话,在布局中设置 android:descendantFocusability="blocksDescendants原创 2019-05-29 11:05:48 · 3357 阅读 · 0 评论 -
自定义线程池管理类
import java.util.concurrent.BlockingQueue;import java.util.concurrent.LinkedBlockingQueue;import java.util.concurrent.ThreadFactory;import java.util.concurrent.ThreadPoolExecutor;import java.util...原创 2019-06-26 09:55:07 · 241 阅读 · 0 评论 -
性能优化导图
转载 2019-06-26 15:22:51 · 115 阅读 · 0 评论 -
SystemClock.sleep(long ms)与Thread.sleep(long millis)分析
废话不多说,先分析:Thread.sleep(long millis),请看参考下图:Thread.sleep(long millis) 会调用 public static void sleep(long millis, int nanos)方法,到此我们详细分析 sleep(long millis, int nanos)此方法,此方法中我们看得点方地方,请参考第二图中原创 2017-10-19 16:40:22 · 989 阅读 · 0 评论 -
android 7.0系统解决拍照的问题
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();StrictMode.setVmPolicy(builder.build());原创 2017-09-13 21:01:40 · 368 阅读 · 0 评论 -
Liunx 搭建NDK开发环境
1、首先下载NDK2、解压NDK sudo tar xvf NDK文件3、复制你要放的目录4、到相应的目录输入 sudo gedit ~/.bashrc5、加入这两行: export ANDROID_NDK=/home/frank/Android/ndk/ export PATH=$ANDROID_NDK:$PATH /home/frank/An原创 2017-01-16 22:37:56 · 397 阅读 · 0 评论 -
LayoutInflater分析
一般我们都是用:inflater.inflate(R.layout.fragment_baby_list, null);来加载一个布局分析:View.inflate()方法,看源码public static View inflate(Context context, @LayoutRes int resource, ViewGroup root) { Layo原创 2017-04-11 11:17:15 · 257 阅读 · 0 评论 -
CoordinatorLayout、AppBarLayout与CollapsingToolbarLayout运用
//这里面放要在头部显示的内容 //头隐藏之后要显示的内容 //内容在Toolbar下面 />原创 2017-05-31 18:18:10 · 316 阅读 · 0 评论 -
谷歌RecyclerView内部Bug
靠,刚开始我还以为我的代码写的有问题,最后一查看,靠,控件BUG,谷歌大牛弄出来的BUG;但仔细查看BUG日志,越界,是什么导致越界呢?其实就是在我们刷新数据时,clean了数据导致List与RecyclerView数据不一至,那怎么解决呢? java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view hold原创 2017-06-06 16:45:07 · 680 阅读 · 1 评论 -
关于startActivityForResult无法拿到回传信息
在使用startActivityForResult时,本人也调试了多次,都没有问题,直到有一天测试告诉我,修改了问题为什么回到前一个界面没有刷新数据呢?我当时就蒙逼了,我手机上都TM不知道搞我多少次,都 没有问题!后来拿到测试的手机oppo R7,无法拿到返回数据。最后查了相关资料,也没有找到什么原因。最后把android:launchMode="singleTask"去掉就没有问题了?但到现原创 2017-06-12 10:53:18 · 228 阅读 · 0 评论 -
关于ViewPage不刷新数据问题
在解决这个问题之前,现在要解了FragmentPagerAdapter与FragmentStatePagerAdapter的区别http://www.cnblogs.com/lianghui66/p/3607091.html可参靠这篇文章详情讲解了区别把FragmentPagerAdapter替换成FragmentStatePagerAdapter,并且重写getItemPositio原创 2017-06-12 11:02:36 · 319 阅读 · 0 评论 -
解决android 7.0系统,调用相机报:android.os.FileUriExposedException错
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder(); StrictMode.setVmPolicy(builder.build()); builder.detectFileUriExposure();原创 2017-08-07 18:17:32 · 237 阅读 · 0 评论 -
ScrollView中嵌套GridView,不在顶部解决办法
LinearLayout下设置其属性android:focusable="true"android:focusableInTouchMode="true"原创 2017-08-09 10:12:25 · 522 阅读 · 0 评论 -
MemoryAnalyzer 使用
1、没有安装请自行下载:http://www.eclipse.org/mat/downloads.php,选择系统 对应版本,否则报错2、通过AS的Android profiler里面的 Dump java heap 导出hprof文件3、通过hprof-conv工具,把hprof转成MemoryAnalyzer能识别的hprof文件 注意:hprof-conv工具在SDK下...原创 2019-06-27 15:40:24 · 2466 阅读 · 0 评论