- 博客(13)
- 资源 (3)
- 收藏
- 关注
原创 使用ImageLoad开源库ListView图片错位问题
解决错位问题: 1.在ListView中使用ImageLoad时,在item的ImageView中绝对不能使用 android:background 来设置图片;2.在代码中也不可以使用以下代码来设置图片holder.iv_icon.setBackgroundResource(R.drawable.ic_xxx);3.若ListView中有区分显示图片的话统一使用ImageLoader.getIn
2016-02-29 10:33:31 399
原创 java.lang.IndexOutOfBoundsException: setSpan (26 ... 26) ends beyond length 10
02-26 18:45:22.793: E/AndroidRuntime(30449): FATAL EXCEPTION: main02-26 18:45:22.793: E/AndroidRuntime(30449): Process: cn.beeba.app, PID: 3044902-26 18:45:22.793: E/AndroidRuntime(30449): java.lang.
2016-02-26 18:50:06 13333 2
转载 Volley之https相关
转载自:http://www.cnblogs.com/androidsuperman/p/4811695.htmlVolley之https信任所有证书实现:public class HttpsTrustManager implements X509TrustManager { private static TrustManager[] trustManag
2016-02-25 16:47:50 417
转载 【Android 一般进阶】固定JSONObject.toString()键值对顺序
转载自:http://blog.csdn.net/ben0612/article/details/44591161org.json.JSONObject相信很多人都用过,例如:服务端返回给客户端的数据格式是JSONObject的,那我们通过对它进行解析,把它显示在界面上。有时候希望服务器跟客户端通信的JSONObjectt的键值对顺序是固定的。例如:客户端提交一个JSO
2016-02-25 16:39:43 5164 2
原创 解决 e.g. x.new A() where x is an instance of xxx.class
No enclosing instance of type xxx.class(你的类) is accessible. Must qualify the allocation with an enclosing instance of type xxx.class(你的类) (e.g. x.new A() where x is an instance of xxx.class(你的类)).出现以上错
2016-02-25 11:17:17 5001
转载 Windows下编译最新volley jar包
蛋疼想自己编译个最新的volley jar用用,随便搜了下方法,如这个 http://blog.csdn.net/wangjia55/article/details/41744181 ,试着编译了下,结果各种报错,最后强迫症发作,捣鼓出来了,编译方式分两种,ant和gradle的使用ant编译因为最新代码已经不在用ant改用gradle来构建工程,但是依然保
2016-02-24 15:54:04 359
转载 Windows下编译最新volley jar包
蛋疼想自己编译个最新的volley jar用用,随便搜了下方法,如这个 http://blog.csdn.net/wangjia55/article/details/41744181 ,试着编译了下,结果各种报错,最后强迫症发作,捣鼓出来了,编译方式分两种,ant和gradle的使用ant编译因为最新代码已经不在用ant改用gradle来构建工程,但是依然保留ant
2016-02-24 13:37:16 503
原创 java中截取字符串技巧
String path="http://localhost:8080/Client/index.jsp";截取出 index,代码如下path.substring(path.lastIndexOf("/")+1, path.lastIndexOf("."))
2016-02-20 15:51:15 768
转载 ListView使用addHeaderView或addFooterView需注意的问题
void addFooterView(View v)//增加一个固定在列表底部的View,参数 v为欲添加的视图 void addFooterView(View v,Object data,boolean isSelectable)//增加一个固定在列表底部的View,参数 v为欲添加的视图,data为与View绑定的数据,isSelectable设置是否可选 void addHeaderVi
2016-02-19 15:38:47 948
原创 ListView中固定item的高度
在Adapter中使用固定高度的值,这样最简单实用。 也就是在xml中固定高度值:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"
2016-02-19 10:09:55 592
原创 Android设计模式-单例模式
1.懒汉模式public class Singleton { private static Singleton instance; private Singleton() { } public static synchronized Singleton getInstance(){ if(instance == null){ ins
2016-02-10 14:52:08 303
原创 监听ListView滑动到底部
pullListView_SongList.setOnScrollListener(new AbsListView.OnScrollListener() { @Override public void onScrollStateChanged(AbsListView view, int scrollState) {} @Overr
2016-02-01 17:14:46 360
原创 PullToRefreshListView的漏洞
(1)setMode不起作用 在使用setMode时,出现设置后不起任何作用,代码如下:pullToRefreshListView.setMode(Mode.DISABLED));pullToRefreshListView.onRefreshComplete();解决方法,经排除bug方法,最后发现以上问题是由于顺序不对导致的问题,也算是PullToRefreshListView中的bug吧,把o
2016-02-01 15:51:57 655
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人