摘要: /res/drawable下添加progress_style.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> 3 <item android:id="@android:id/background"> 4 <shape> 5 <gradient android:startCol 阅读全文
posted @ 2012-11-15 15:45 mr.coke 阅读(2042) 评论(0) 推荐(0) 编辑
摘要: 启动线程1 Thread thread = new Thread(new AbcThread());2 thread.start();AbcThread 线程类class LoadLinkDataThread implements Runnable { public void run() { Message msg = handler.obtainMessage(); msg.what = 1; handler.sendMessage(msg); } }handler处... 阅读全文
posted @ 2012-11-15 15:36 mr.coke 阅读(157) 评论(1) 推荐(0) 编辑
摘要: public class NetworkState { private static ConnectivityManager ctm; public NetworkState() { } public static boolean isOk(Activity act) { Context ctx = act.getApplicationContext(); ctm = (ConnectivityManager) ctx .getSystemService(Context.CONNECTIVITY_SERVICE)... 阅读全文
posted @ 2012-11-15 15:28 mr.coke 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 1 public class Http { 2 private static final int REQUEST_TIMEOUT = 5000; 3 private static final int SO_TIMEOUT = 10000; 4 5 public Http() { 6 } 7 8 public static String sendGet(String url, Map<String, String> headers) 9 throws ClientProtocolException, IOException {... 阅读全文
posted @ 2012-11-15 15:27 mr.coke 阅读(4153) 评论(0) 推荐(1) 编辑