摘要: ImageButton webClose = (ImageButton)this.findViewById(R.id.webClose); webClose.setOnClickListener(new OnClickListener(){ @Override public void onClick(View v) { // TODO Auto-generated method stub browser.destroy(); // 可以在关闭视频时停止声音 ... 阅读全文
posted @ 2012-07-16 18:38 日光之下无新事 阅读(710) 评论(0) 推荐(0) 编辑
摘要: public static boolean isNumeric(String str){ try { Integer.parseInt(str); return true; } catch (NumberFormatException e) { // TODO Auto-generated catch block return false; }} 阅读全文
posted @ 2012-07-16 18:37 日光之下无新事 阅读(102) 评论(0) 推荐(0) 编辑
摘要: android 中,利用瀏覽器來開啟網頁的做法為String url_Str = "http://www.google.com.tw";Uri uri = Uri.parse(url_Str);Intent intent = new Intent(Intent.ACTION_VIEW,uri);startActivity(intent); 但是若要在url後面加上參數則可能會造成中文亂碼問頭發生,解決方法為將參數利用URLEncoder.encode轉成utf8再傳送即可String url_Str="http://www.yahoo.com/search?tes 阅读全文
posted @ 2012-07-16 18:27 日光之下无新事 阅读(499) 评论(0) 推荐(0) 编辑