• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Patata
http://weibo.com/totome
博客园    首页    新随笔    联系   管理    订阅  订阅
2012年9月2日
ListView数据异步加载与AsyncTask
摘要: 主Activitypublic class MainActivity extends Activity { ListView listView; File cache; Handler handler = new Handler(){ public void handleMessage(Message msg) { //异步加载完后的图片数据集合 listView.setAdapter(new ContactAdapter(MainActivity.this, (List<Cont... 阅读全文
posted @ 2012-09-02 20:48 Blacksky 阅读(1489) 评论(0) 推荐(0)
JSON格式传输数据
摘要: JSON数据格式[{id:56,title:"xxxxx",timelength:90},{id:16,title:"xbbx",timelength:20}] 1 /** 2 * 获取最新的视频资讯 3 * @return 4 * @throws Exception 5 */ 6 public static List<News> getJSONLastNews() throws Exception{ 7 8 String path = "http://192.168.0.168:8080/web/ListServlet... 阅读全文
posted @ 2012-09-02 20:16 Blacksky 阅读(873) 评论(0) 推荐(0)
Activity详解
摘要: Activity 生命周期显式 Intent 调用 1 //创建一个显式的 Intent 对象(方法一:在构造函数中指定) 2 Intent intent = new Intent(Intent_Demo1.this, Intent_Demo1_Result1.class); 3 4 Bundle bundle = new Bundle(); 5 bundle.putString("id", strID); 6 ... 阅读全文
posted @ 2012-09-02 20:09 Blacksky 阅读(461) 评论(0) 推荐(0)
采用Pull解析器解析和生成XML内容.
摘要: Xml对象: 1 /** 2 * 获取数据 3 * @param xml 4 * @return 5 * @throws Exception 6 */ 7 public static List<Person> getPersons(InputStream xml) throws Exception 8 { 9 List<Person> persons = null;10 Person person = null;11 12 XmlPullParser pullParser = Xm... 阅读全文
posted @ 2012-09-02 17:50 Blacksky 阅读(229) 评论(0) 推荐(0)
Android网络编程(一)
摘要: 网络通信层次图TCP报文段格式建链过程中的“三次握手”1、SYN(Synchronize Sequence Numbers)是TCP是传输控制协议中的一个标志位。如果该位被置为1,则表示这个报文是一个请求建立连接的报文。 2、ACK(ACKnowledge Character)中文:确认字符。也是TCP是传输控制协议的一个标志位。在数据通信传输中,接收站发给发送站的一种传输控制字符。它表示确认发来的数据已经接受无误。是一个用于确认的报文。关闭链路的四次握手1、FIN(finish) 结束,没有更多的数据发送Http请求协议GET /img/iknow/msg/msg.gif HTTP/1.1A 阅读全文
posted @ 2012-09-02 10:04 Blacksky 阅读(555) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3