Android
KKgege
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Android GPS定位获取当前位置
Location location = locationManager.getLastKnownLocation(LocationManagerProxy.GPS_PROVIDER);这个函数不能定义得太早,否则程序启动不起来,在button按下去的时候调用,果然获取到了当前位置。原创 2012-06-29 20:27:38 · 474 阅读 · 0 评论 -
android实现进入百度地图后自动显示兴趣点
android实现进入百度地图后自动显示兴趣点原创 2014-02-28 10:13:25 · 1433 阅读 · 1 评论 -
BitmapFactory.decodeStream 报错OUT OF MEMORY ERROR
软件做的差不多了,在点来点去的时候发现系统会奔溃。 报错就是Caused by: java.lang.OutOfMemoryError 错误定位于tmpBitmap = BitmapFactory.decodeStream(is); 这一行。开始以为和其他人一样是 bitmap忘记回收了,所以加了recyle,还是会报错。继续测试发现报错是报在特定的图片上,一打开图片url ,忽然就豁然开朗原创 2014-01-22 14:05:13 · 805 阅读 · 0 评论 -
android 相对布局,代码创建imageview,布局居中问题
android 相对布局,代码创建imageview,布局居中问题原创 2013-12-27 14:40:32 · 1833 阅读 · 0 评论 -
android通过url读取网络图片
android通过url读取网络图片原创 2013-12-26 10:53:10 · 891 阅读 · 0 评论 -
andorid 报错bindertransation
原因是 官方规定intent传递时,数据不能超过1MThe Binder transaction buffer has a limited fixed size, currently 1Mb, which is shared by all transactions in progress for the process. (http://developer.android.com/intl原创 2014-01-08 16:51:50 · 856 阅读 · 0 评论 -
andorid控制代码new 出的 imageview宽高
用xml很好实现,但是项目中要用到动态new出Imageview,所以用代码直接new Imageview。用了好多方法没有实现,如: ImageView photo=new ImageView(mContext); RelativeLayout.LayoutParams param = new RelativeLayout.LayoutParams(100,200);原创 2013-12-25 14:12:53 · 785 阅读 · 0 评论 -
调用android系统相机,按返回键返回和拍照成功返回的resultCode也一样
用此方法调用android系统相机后,若按返回键会报空指针错误,原因是拍照不成功,没有返回图片。 Intent imageCaptureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(imageCaptureIntent, REQ_CAPTURE_IMAGE);所以原创 2014-01-08 14:22:53 · 3150 阅读 · 0 评论 -
android百度地图取得屏幕中心点的坐标
开始网上搜了,好多方式显得有点复杂,后来自己研究了下百度地图android的API,,发现了两个方法getcenterpixel和fromPixels,组合了下,发现就能取到屏幕中心点的坐标了 //取得屏幕中心点的屏幕坐标偏移. Point p=mMapView.getCenterPixel(); System.out.println(p.x+"---y:"+p.y); //取得屏原创 2014-01-02 14:32:57 · 3271 阅读 · 0 评论 -
android端 获取百度LBS云端的数据,平获取自定义点
效果如上图所示,获取一堆点,根据每个点的自定义字段来决定自己的颜色。网上一直没类似的教程, 虽然读百度 说明文档不难,但是还有些要注意的点:1. 百度LBS云端 创建自定义字段 “发布到检索”要设置成“是”。2.取CloudPoiInfo中的extra 信息,如, cloudpoiinfo.extras.get("style_hz") 这样就能取到自定义点了原创 2013-12-08 22:35:34 · 781 阅读 · 0 评论 -
Android intent 传值细节
intent 传值必须为String, intent.putExtra("no1", "asfd"); startActivity(intent);这样能传过去 intent.putExtra("no1", 1234); startActivity(intent);这样就不行。 哎, 好久没玩,生疏了原创 2013-11-14 21:09:13 · 543 阅读 · 0 评论 -
android自动生成.apk文件
一般直接在bin目录下有,没有的话 配置一下 window---preference---build----skip skackging ********* 把后面的勾去掉 ,在 project--clean 下项目 ,就有啦~!~原创 2014-02-20 17:00:27 · 520 阅读 · 0 评论
分享