摘要: public class InputMethodUtil { private static InputMethodUtil instance; public static InputMethodUtil getInstance() { if (instance == null) instance = new InputMethodUtil(); ... 阅读全文
posted @ 2014-06-09 16:25 NúllPòinterExcêptīon 阅读(134) 评论(0) 推荐(0) 编辑
摘要: @Override public int onStartCommand(Intent intent, int flags, int startId) { System.out.println("---------->>onStartCommand2"); re... 阅读全文
posted @ 2014-05-26 11:23 NúllPòinterExcêptīon 阅读(538) 评论(0) 推荐(0) 编辑
摘要: 1. 定义对象 LocationClient mLocationClient = null; BDLocationListener myListener = new MyLocationListener(); LocationData locData = null;2. 新建MyLocationListener类 实现BDLocationListener接口public class MyLocat... 阅读全文
posted @ 2014-04-17 09:53 NúllPòinterExcêptīon 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 下面以添加480×800 DPI240 和320×480 DPI160 两种常见的分辨率为例。按如下步骤: 打开命令行窗口,进入到VirtualBox 安装目录下。我的虚拟机名称叫android_4,假设你的也是,执行:VBoxManage setextradata "android_4" "CustomVideoMode1" "480x800x16"VBoxManage setextradata... 阅读全文
posted @ 2014-04-15 09:19 NúllPòinterExcêptīon 阅读(626) 评论(0) 推荐(0) 编辑
摘要: 在我们用Android开发过程中,会碰到Activity在切换到后台或布局从横屏LANDSCAPE切换到PORTRAIT,会重新切换Activity会触发一次onCreate方法。 在Android开发中这种情况视可以避免的,我们可以在androidmanifest.xml中的activit元素加入这个属性android:configChanges="orientation|keyboardHid... 阅读全文
posted @ 2014-04-10 16:29 NúllPòinterExcêptīon 阅读(1394) 评论(0) 推荐(0) 编辑
摘要: 1.到http://developer.baidu.com/map/sdkandev-download.htm下载lib库,然后在Android工程中引用jar和so文件。 2.到http://developer.baidu.com/map/android-mobile-apply-key.htm申请Key 3.在Manifest中添加使用权限、Android版本支持和对应的开发密钥; 常用使用权... 阅读全文
posted @ 2014-04-10 15:24 NúllPòinterExcêptīon 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1.Intent intent = new Intent();intent.setClass(getApplicationContext(), TwoActivity.class);intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); startActivity(intent); 阅读全文
posted @ 2014-04-08 15:57 NúllPòinterExcêptīon 阅读(345) 评论(0) 推荐(0) 编辑
摘要: Intent intent= new Intent();intent.setData(Uri.parse("http://www.baidu.com/"));intent.setAction(Intent.ACTION_VIEW);startActivity(intent); 阅读全文
posted @ 2014-01-17 16:40 NúllPòinterExcêptīon 阅读(766) 评论(0) 推荐(0) 编辑
摘要: 这两天在用自定义Adapter时 老是遇到convertView.getTag() 空指针异常后来终于发现 忘了设置convertView.setTag(view);@Override public View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub view = new ViewHolder(); if (convertView == null) { convertView =... 阅读全文
posted @ 2014-01-14 23:09 NúllPòinterExcêptīon 阅读(1549) 评论(0) 推荐(0) 编辑
摘要: 设置ListView的Adapter后调用该方法。public void setListViewHeightBasedOnChildren(ListView listView) { ListAdapter listAdapter = listView.getAdapter(); if (listAdapter == null) { // pre-condition return; } int totalHeight = 0; ... 阅读全文
posted @ 2014-01-08 16:23 NúllPòinterExcêptīon 阅读(166) 评论(0) 推荐(0) 编辑