上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要: 新建类,继承自GridView,重写onMeasure()方法public class MyGridView extends GridView { public MyGridView(Context context, AttributeSet attrs) { super(... 阅读全文
posted @ 2015-11-10 18:59 pepelu 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 原因:Android端发送的是utf-8格式,但服务器端解码格式是iso-8859-1,所以会产生乱码。 解决办法: Android端:   服务器端:   以上 阅读全文
posted @ 2015-10-26 09:50 pepelu 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Android 4.1 APP中的static变量即使在APP退出后仍然会保留最后赋值状态。public class MainActivity extends Activity { private TextView tv; private static int i=10; @Ove... 阅读全文
posted @ 2015-10-22 20:04 pepelu 阅读(496) 评论(0) 推荐(0) 编辑
摘要: http://stackoverflow.com/questions/9654148/android-asynctask-threads-limitsantonyt:All AsyncTasks are controlled internally by a shared (static)Thread... 阅读全文
posted @ 2015-10-18 16:05 pepelu 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 参考博文:https://xjaphx.wordpress.com/2011/07/14/listview-doesnt-respond-to-onitemclicklistener/#1,listview item中包含checkbox,需要改变checkbox的属性设置:android:focu... 阅读全文
posted @ 2015-10-17 14:58 pepelu 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 原因:http://m.blog.csdn.net/blog/Melody8869/46908891java.lang.NoClassDefFoundError: com.android.volley.toolbox.Volley导致这种异常有以下几种原因:1.adt版本问题,更新adt版本2、ja... 阅读全文
posted @ 2015-10-13 11:29 pepelu 阅读(1051) 评论(0) 推荐(0) 编辑
摘要: 在使用Gson时遇到org.json.JSONException: End of input at character 0 of 异常。public static void jsonArrayRequest(final MainActivity mainActivity, RequestQueue ... 阅读全文
posted @ 2015-10-09 18:33 pepelu 阅读(7937) 评论(0) 推荐(0) 编辑
摘要: MainActivity:public class MainActivity extends Activity { private MyReceiver receiver; private Button btnStartOrPause; private String receive... 阅读全文
posted @ 2015-10-08 20:04 pepelu 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 1.设置-〉个人热点-〉打开USB共享手机网络 2.确认已经安装手机驱动(可以通过豌豆荚安装手机驱动) 可以通过计算机-〉管理-〉设备管理器  查看:       3.关闭电脑其余网络连接。 4.关闭电脑防火墙。(必须) 5.打开cmd,运行ipconfig查看本机ip。 6.运行tomcat后在手 阅读全文
posted @ 2015-09-28 23:10 pepelu 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 加载Internet图片并显示在ImageView上。不可以在子线程中更改界面布局。需要使用连接网络的权限:布局文件: View CodeActivity类:package com.example.netdemo;import java.io.IOException;import ja... 阅读全文
posted @ 2015-09-28 18:18 pepelu 阅读(211) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 10 下一页