android
zhoulesin_dev
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
将任意对象转换为Parcelable类型竟然不损耗性能
原文地址:https://github.com/baoyongzhang/ParcelableGenerator介绍ParcelableGenerator可以将任意对象转换为Parcelable类型,方便对象传输。在Android中,对象的序列化一般有两种方式,一种是Serializable,一种是Parcelable。Serializable 在Java中就存在,效率转载 2017-03-08 09:54:25 · 516 阅读 · 0 评论 -
RecyclerView用notifyDataSetChanged()刷新时候的图片闪烁
1.ListView和RecyclerView的adapter在刷新上方法的不同:notifyItemChanged(int position) 更新列表position位置上的数据notifyItemInserted(int position)列表position位置添加一条数据,有动画效果notifyItemRemoved(int position)列表position位置移除一条数据,有动画...转载 2018-05-03 17:56:46 · 5159 阅读 · 1 评论 -
scrollView 嵌套 RecyclerView 显示时会滚动到RecyclerView第一项
recyclerView自动获取了焦点解决:1.recyclerView去除焦点recyclerview.setFocusableInTouchMode(false);recyclerview.requestFocus();2.让scrollView 或者 recyclerView顶端的某个空间获取焦点tv_goodsName.setFocusableInTouchMode(true); tv_...原创 2018-05-10 20:10:58 · 1108 阅读 · 0 评论 -
scrollView 嵌套textview显示不全记录
scrollview嵌套textview或者其他控件显示不全,基本上都属于嵌套的控件做出了位置调整。比如textview设置了marginTop,如果textview和scrollview都是全屏显示的这就导致textview下边有一块显示不全,正确的做法应该是在scrollview中设置paddingTop,这就避免了显示不全的问题。还有,比如textview明明设置了高度match_paren...原创 2018-05-10 23:22:06 · 2337 阅读 · 0 评论 -
简单的ScrollView嵌套RecyclerView
描述:ScrollView嵌套RecyclerView的情况,recyclerView正常,但外部ScrollView没有效果解决:1.重写RecyclerView的LayoutManager的方法canScrollVertically(或者水平方向),返回false2.在RecyclerView外部嵌套一层RelativeLayout...原创 2018-05-07 14:08:41 · 355 阅读 · 0 评论 -
RecyclerView 的 item 宽度width不能全屏的问题
在onCreateViewHolder 时候不要使用 inflater.from(context).inflate(R.layout.item,null)而应该用inflate.from(context).inflate(R.layout.item,parent,false)原创 2018-05-07 17:11:50 · 1138 阅读 · 1 评论
分享