摘要:
例子:XML 文件保存在res/drawable/gradient_box.xml: 下面这个 XML 把shape应用到view:在程序代码里获取shape,应用到viewResources res =getResources();Drawable shape = res.getDrawable(R.drawable.gradient_box);TextView tv =(TextView)findViewByID(R.id.textview);tv.setBackground(shape);例子 ... 阅读全文
posted @ 2014-01-06 09:36
江海不系舟
阅读(263)
评论(0)
推荐(0)
摘要:
public boolean hasGPSDevice(Context context) { final LocationManager mgr = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE); if ( mgr == null ) return false; final List providers = mgr.getAllProviders(); if ( providers == null ) ... 阅读全文
posted @ 2014-01-06 09:25
江海不系舟
阅读(502)
评论(0)
推荐(0)

浙公网安备 33010602011771号