- 博客(14)
- 收藏
- 关注
原创 即时行乐的总结
1,可以分页滑动的gridview,并且注意 viewpager调用 notifydatasetchanger()方法是无效的,需要重写 adapter某个方法。2,expendlistview。让第二层级展示gridview而不是原来的listview,需要重写gridview3,fragment回退站的使用,先进入F1,再进F2,然后把F2添加到回退栈,按返回键才会回到 F1,为什么?
2015-12-25 18:30:16
427
转载 如何取消一个AsyncTask?
在生命周期结束的时候,判断if(mTask=!null&&mTask.getStatus()==AsyncTask.Status.RUNNING){mTask.cancle(true);}注意这里调用 cancle方法仅仅是传了一个 信号,并不是真正的取消掉一个线程,需要在 DoinBackGround方法进行判断if(isCancled),跳出执行逻辑才会结束当前线程
2015-12-20 09:03:36
646
原创 关于 Fragment 一些 坑
先看 这一段 代码,private void showDetail(int index) {manager = getFragmentManager();FragmentTransaction transaction = manager.beginTransaction();switch (index) {case 0:details = FragmentFactory.c
2015-12-16 16:42:49
613
转载 点击list,可以新增加一个自定义view的效果
poplistview PopupListViewhttps://github.com/Trinea/android-open-project實現ListItem 點擊後置頂並可顯示客製化添加的item的內部View 的ListView项目地址:https://github.com/s8871404/PopupListViewDemo 地址:https://play.goo
2015-12-15 22:04:36
398
原创 动态添加子view,并让其随机分布
今天项目中遇到需要随机动态的展示子view,比如让汽车随机出现在地图上,车的数量也是随机的。FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTE
2015-12-10 19:16:11
681
转载 listview 聊天自动刷新到底部
If you would like to after you have updated by listAdapter, you want to make sure that the list is scrolled all the way to the bottom,so that it displays the last element entered in the list. You c
2015-12-09 11:21:17
378
原创 Gosn的使用
String jsonLists; try { jsonLists = new JSONObject(response).get("chglist").toString(); Type listType = new TypeToken>() { }.getType(); final List datas = new Gson().fromJson(jsonLists,
2015-12-08 11:09:31
443
转载 图片加载开源框架知识汇总;
1,http://www.jianshu.com/p/4a3177b57949 Glide 一个专注于平滑滚动的图片加载和缓存库2,http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0327/2650.html Google推荐的图片加载库Glide介绍3,http://blog.youkuaiyun.com/xiaanmi
2015-10-21 09:26:13
258
转载 转载一些值得收藏的文章
1,2016秋招面经(蘑菇街+BT+网易杭研+CVTE+唯品会) http://www.nowcoder.com/discuss/3206?hmsr=toutiao.io&source=rss&utm_medium=toutiao.io&utm_source=toutiao.io
2015-10-20 14:20:55
489
原创 最近的学习
1,探讨秋招各大顶级公司关于AsynTask的面试问题,求大神指点!!?http://www.zhihu.com/question/363793312,fragment嵌套fragment,子fragment的onActivityResult()不回调。可以getParent().startActivityForResult(intent), 然后在父Fragment的onActi
2015-10-19 12:08:56
267
原创 几个疑惑的问题
1,fragmentadapter和fragment事物之间的关系,如果用viewpager的话,我没看到有人用事物然后替换当前布局,还有fragmentadapter的getfragment等等这些原理还不清楚。2,dicklrucache涉及很多流的操作,又忘得差不多了。
2015-10-16 08:26:29
389
原创 一路走来遇到的难点
1.listview的高亮显示,比如做菜单的时候,子菜单会切换2. 两个listview 数据的切换,就是数学---》人教版,鲁版,它的值又是个listview,动态的切换数学的版本3,android design的茫然4,android studio的使用,工程的导入和gradle的使用
2015-10-13 13:10:31
342
原创 android design 全方位学习,应用实战遇到的问题。
今天开始做个音乐应用,会用到最新的材料设计。把遇到的问题记下来。1,DrawerLayout
2015-10-13 10:11:06
464
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人