随笔分类 -  Android

摘要:单选对话框弹出 final String[] items=new String[list.size()];Iterator iterator=list.iterator();int i=0;while (iterator.hasNext()) {items[i++]=iterator.next();}AlertDialog.Builder aleBuilder=new AlertDialog.Builder(MainActivity.this);aleBuilder.setTitle("选择Appid").setSingleChoiceItems(items, -1, ne 阅读全文
posted @ 2013-08-14 09:52 Blue-Dream 阅读(237) 评论(0) 推荐(0)
摘要:" android:textSize="20dp" /> " android:textSize="20dp" /> http://www.114la.com/other/rgb.htmhttp://findicons.com/icon/49461/voice_chat?id=404981 阅读全文
posted @ 2013-08-05 17:21 Blue-Dream
摘要:单元测试1: 2:public String read(String filename)在自己的类中写被测试的方法,如:fileservice类的service方法3:建立测试类public class Test extends AndroidTestCase {private static final String TAG="Test";public void testRead() throws Throwable{FileService service=new FileService(this.getContext());String result=service.re 阅读全文
posted @ 2013-07-31 17:25 Blue-Dream 阅读(261) 评论(0) 推荐(0)
摘要:HttpClient进行网络通信----------------------------------1:get方式String httpUrl = "http://59.64.158.106:8080/test/xxx.jsp"; //HttpGet对象 HttpGet httpGet = new HttpGet(httpUrl); try{ //取得HttpClient对象 HttpClient httpClient = new DefaultHttpClient(); //请求HttpClient,取得HttpResponse HttpResponse httpResp 阅读全文
posted @ 2013-07-31 17:22 Blue-Dream 阅读(230) 评论(0) 推荐(0)