android
文章平均质量分 78
qqTuBo
这个作者很懒,什么都没留下…
展开
-
Android 动态添加View
Android中可以从xml中读取布局,但是动态添加有时方便很多首先需要的Viewprivate Context mContext = null; private TextView view1 = null; private TextView view2 = null; private TextView view3 = null; private RelativeLayout layo原创 2013-03-07 22:03:31 · 1298 阅读 · 0 评论 -
Android GPS 定位 1
首先AndroidManifest中加入许可 通过系统服务获取LocationManagerLocationManager manager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);设定定位需要的标准Criteria criteria = new Criteria();原创 2013-03-06 21:56:53 · 959 阅读 · 0 评论 -
Android GPS 定位 2 详细地址
android中有自带的GeoCoder类,但是里面之多只能查询到XX市,详细的地址信息还是要通过调用google的GeoCoding Api来获取首先通过定位获取当前经纬度,和1中基本一样之后当获取到当前经纬度后开启异步任务private LocationListener listener = new LocationListener() { public void o原创 2013-03-08 21:05:42 · 1169 阅读 · 0 评论 -
Android GPS 定位 3 详细地址周边地图图片
首先准备工作和2中一样直接如下private static Location location = null; private LocationManager manager = null; private TextView latitudeTxt = null; private TextView longitudeTxt = null; private TextView原创 2013-03-10 00:01:02 · 1331 阅读 · 0 评论 -
Android ImageView图片拖动效果
直接用了 Android GPS 定位 3 详细地址周边地图图片 中的工程修改的,通过ImageView.setOnTouchListener方法实现及对ImageView的矩阵进行平移变换来实现的。先把获取到的图的尺寸改大些。String sURL = "http://maps.googleapis.com/maps/api/staticmap?center=" + locat原创 2013-03-10 22:40:27 · 1328 阅读 · 0 评论 -
Android 定位问题和百度地图SDK使用
在获取手机提供的provider时,可能会出现空指针的错误,例如一些4.0的系统在获取network_provider时会出现空指针,导致无法通过WIFI定位。如果又是在室内无法使用GPS定位的话就会很尴尬。只能通过百度地图的api来定位了。百度地图有很多版本,3.X版本接口丰富,但是SDK体积大;1.X版本简单实用,配合google map,直接拼接处url请求就可获得各种定位信息,周边地图等等原创 2013-03-12 21:14:27 · 2881 阅读 · 2 评论