会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
香蕉你个博纳纳
博客园
首页
新随笔
新文章
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
11
下一页
2018年7月9日
android:windowSoftInputMode属性;界面关闭后软键盘不隐藏的解决方法;
摘要: stateUnspecified:软键盘的状态并没有指定,系统将选择一个合适的状态或依赖于主题的设置stateUnchanged:当这个activity出现时,软键盘将一直保持在上一个activity里的状态,无论是隐藏还是显示stateHidden:用户选择acti...
阅读全文
posted @ 2018-07-09 16:47 香蕉你个博纳纳
阅读(467)
评论(0)
推荐(0)
编辑
2018年6月28日
for循环中进行联网请求数据、for循环中进行异步数据操作,数据排序错乱问题解决;
摘要: for循环中进行联网请求数据,由于网络请求是异步的,第一个网络请求还没有回调,第二次第三次以及后续的网络请求又已经发出去了,有可能后续的网络请求会先回调;这时我们接收到的数据的排序就会错乱;怎么才能让数据和for循环进行异步操作之前的顺序一样呢;1、网络请求使用同步请...
阅读全文
posted @ 2018-06-28 15:54 香蕉你个博纳纳
阅读(761)
评论(0)
推荐(0)
编辑
2018年6月27日
匿名内部类中不能修改int变量时、final int i 不能改变i的值时、或 i++线程不安全。使用AtomicInteger;
摘要: 在匿名内部类或某某情况下中引入的变量必须是Final最终型的;这时还想要去修改这个变量就需要使用到AtomicInteger这个类了;AtomicInteger CarSize = new AtomicInteger();CarSize.getAndIncrement...
阅读全文
posted @ 2018-06-27 17:16 香蕉你个博纳纳
阅读(393)
评论(0)
推荐(0)
编辑
2018年6月21日
Android手动控制软键盘的开启和关闭,判断软键盘是否显示;
摘要: 工具类,拿走就能用: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)
编辑
2018年6月14日
ViewPager的addOnPageChangeListener和setOnPageChangeListener的区别,ViewPager改变数据后IndexOutOfBoundsException
摘要: 我的ViewPager数据改变后,在切换界面刷新数据时:OnPageChangeListener中的数据IndexOutOfBoundsException,我们来看源码探一下究竟;代码时这样写的:vpLoveCar.addOnPageChangeListener(ne...
阅读全文
posted @ 2018-06-14 11:54 香蕉你个博纳纳
阅读(495)
评论(0)
推荐(0)
编辑
2018年6月11日
Can't create handler inside thread that has not called Looper.prepare()
摘要: Looper.prepare(); // Can't create handler inside thread that has not called Looper.prepare()。 ...
阅读全文
posted @ 2018-06-11 16:22 香蕉你个博纳纳
阅读(216)
评论(0)
推荐(0)
编辑
2018年6月6日
Android 打开高德地图、百度地图进行导航;打开第三方App去导航;
摘要: 抽成工具类了,复制下来就能直接用了,直接看代码吧;高德地图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)
编辑
使用Handlerf发送消息或使用Handler轮询时,报错IllegalStateException:This message is already in use.;
摘要: 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)
编辑
RSA加密解密,String转PublicKey、PrivateKey;附Base64.JAR
摘要: 网络请求的数据需要加密,服务器给的他们那一套在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)
编辑
2018年6月1日
RecyclerView拖拽排序;
摘要: 效果就是这样,RecyclerView列表可拖拽排序,可删除,可添加;RecyclerView给我们提供了一个手势器: ItemTouchHelper helper = new ItemTouchHelper(new ItemTouchHelper.Callback(...
阅读全文
posted @ 2018-06-01 18:22 香蕉你个博纳纳
阅读(1123)
评论(0)
推荐(0)
编辑
上一页
1
2
3
4
5
6
7
8
9
10
11
下一页