adb 常用命令
摘要:查看设备 adb devices查看设备 android 版本信息adbshellgetpropro.build.version.release
阅读全文
posted @
2013-02-18 15:41
Tristan2012
阅读(113)
推荐(0)
android 静默安装
摘要:倒腾一下午,终于搞定了android的静默安装 步骤如下1、 Manifest 配置 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.DELETE_PACKAGES"
阅读全文
posted @
2013-02-16 16:11
Tristan2012
阅读(8527)
推荐(0)
利用AsyncTask实现list异步加载
摘要:http://www.apkbus.com/blog-123261-44908.html
阅读全文
posted @
2012-12-04 11:30
Tristan2012
阅读(210)
推荐(0)
AlertDialog 在线程中无法关闭问题
摘要:今天遇到AlertDialog根据请求返回值来判定是否关闭对话框的问题但是一直无法关闭 1 // 对话框不消失 2 try 3 { 4 Field field = dialog.getClass().getSuperclass() 5 .getDeclaredField("mShowing"); 6 ...
阅读全文
posted @
2012-11-27 18:35
Tristan2012
阅读(1007)
推荐(0)
WebView中发送form请求 会弹出空白页
摘要:总是弹出空白页,在浏览器中和iphone上无此问题觉得是android webview问题 查到了这样一个解决方案先判定是否有空白页,截取到空白页后 就直接转向请求的地址 1 webviewNavLayout = (RelativeLayout)findViewById(R.id.webviewNavLayout); 2 webview = (WebView)findViewById(R.id.webviewLayout); 3 4 webview.setWebViewClient(new WebViewClient() 5 { 6 7 ...
阅读全文
posted @
2012-11-13 15:45
Tristan2012
阅读(1315)
推荐(0)
退出应用程序的问题
摘要:在mainlist 中 退出应用程序后 发现总是会调用oncreate在loginactivity中 注意黄色标注行 Intent intent = new Intent(context, MainList.class); intent.setFlags(intent.FLAG_ACTIVITY_CLEAR_TOP); context.startActivity(intent); // finish finish();同时在 loginactivity中 @Override ...
阅读全文
posted @
2012-11-12 16:03
Tristan2012
阅读(155)
推荐(0)
调用系统自带一些功能的代码
摘要:http://www.2cto.com/kf/201203/124467.html
阅读全文
posted @
2012-11-06 17:25
Tristan2012
阅读(145)
推荐(0)
设置TextView为下划线的样式
摘要:1 tvUserTel.setText(Html.fromHtml("<u>"+usertel+"</u>"));2 tvUserTel.setTextColor(Color.BLUE);//设置为蓝色
阅读全文
posted @
2012-11-06 16:37
Tristan2012
阅读(187)
推荐(0)
android 防止按钮连续点击的方法(Button,ImageButton等)
摘要:public class Utils { private static long lastClickTime; public static boolean isFastDoubleClick() { long time = System.currentTimeMillis(); long timeD = time - lastClickTime; if ( 0 < timeD && timeD < 500) { return true; } lastClickTime = ...
阅读全文
posted @
2012-10-24 18:13
Tristan2012
阅读(1774)
推荐(0)
判定EditText中输入为空的方法
摘要:if ("".equals(text.getText().toString().trim()))
阅读全文
posted @
2012-10-23 09:24
Tristan2012
阅读(311)
推荐(0)
自定义checkbox后,文字和图片间距问题
摘要:今天开发过程中自定义了checkbox样式,但是后来发现图片离文字总是有一些间隔将checkbox的背景设置如下可以解决这个问题,让文字紧贴图片 android:background="@null"
阅读全文
posted @
2012-10-09 17:14
Tristan2012
阅读(2025)
推荐(0)