摘要: stateUnspecified:软键盘的状态并没有指定,系统将选择一个合适的状态或依赖于主题的设置stateUnchanged:当这个activity出现时,软键盘将一直保持在上一个activity里的状态,无论是隐藏还是显示stateHidden:用户选择acti... 阅读全文
posted @ 2018-07-09 16:47 香蕉你个博纳纳 阅读(467) 评论(0) 推荐(0) 编辑
摘要: for循环中进行联网请求数据,由于网络请求是异步的,第一个网络请求还没有回调,第二次第三次以及后续的网络请求又已经发出去了,有可能后续的网络请求会先回调;这时我们接收到的数据的排序就会错乱;怎么才能让数据和for循环进行异步操作之前的顺序一样呢;1、网络请求使用同步请... 阅读全文
posted @ 2018-06-28 15:54 香蕉你个博纳纳 阅读(761) 评论(0) 推荐(0) 编辑
摘要: 在匿名内部类或某某情况下中引入的变量必须是Final最终型的;这时还想要去修改这个变量就需要使用到AtomicInteger这个类了;AtomicInteger CarSize = new AtomicInteger();CarSize.getAndIncrement... 阅读全文
posted @ 2018-06-27 17:16 香蕉你个博纳纳 阅读(393) 评论(0) 推荐(0) 编辑
摘要: 工具类,拿走就能用:import android.annotation.TargetApi;import android.app.Activity;import android.content.Context;import android.graphics.Rect;... 阅读全文
posted @ 2018-06-21 17:45 香蕉你个博纳纳 阅读(1915) 评论(0) 推荐(0) 编辑
摘要: 我的ViewPager数据改变后,在切换界面刷新数据时:OnPageChangeListener中的数据IndexOutOfBoundsException,我们来看源码探一下究竟;代码时这样写的:vpLoveCar.addOnPageChangeListener(ne... 阅读全文
posted @ 2018-06-14 11:54 香蕉你个博纳纳 阅读(495) 评论(0) 推荐(0) 编辑
摘要: Looper.prepare(); // Can't create handler inside thread that has not called Looper.prepare()。 ... 阅读全文
posted @ 2018-06-11 16:22 香蕉你个博纳纳 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 抽成工具类了,复制下来就能直接用了,直接看代码吧;高德地图Url Api: http://lbs.amap.com/api/amap-mobile/guide/android/navigation百度地图Url Api:http://lbsyun.baidu.com/... 阅读全文
posted @ 2018-06-06 16:09 香蕉你个博纳纳 阅读(988) 评论(0) 推荐(0) 编辑
摘要: java.lang.IllegalStateException: { when=-107ms what=9 obj=com.saicmaxus.maxuslife.model.CarInfo@be47330 target=com.cc.fragment.OwnerS... 阅读全文
posted @ 2018-06-06 13:54 香蕉你个博纳纳 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 网络请求的数据需要加密,服务器给的他们那一套在Android一直报错,自己写了一个;package com.cc.common.util;import javax.crypto.Cipher;import java.security.*;import java.sec... 阅读全文
posted @ 2018-06-06 10:56 香蕉你个博纳纳 阅读(1357) 评论(0) 推荐(0) 编辑
摘要: 效果就是这样,RecyclerView列表可拖拽排序,可删除,可添加;RecyclerView给我们提供了一个手势器: ItemTouchHelper helper = new ItemTouchHelper(new ItemTouchHelper.Callback(... 阅读全文
posted @ 2018-06-01 18:22 香蕉你个博纳纳 阅读(1123) 评论(0) 推荐(0) 编辑