2012年7月4日
摘要: SimpleAdapter SimpleAdapter是扩展性最好的适配器,可以定义各种你想要的布局,而且使用很方便SimpleAdapter(Contextcontext,List<?extendsMap<String,?>> data, int resource,String[]from, int[] to)参数context:上下文,比如this。关联SimpleAdapter运行的视图上下文参数data:Map列表,列表要显示的数据,这部分需要自己实现,如例子中的getData(),类型要与上面的一致,每条项目要与from中指定条目一致参数re... 阅读全文
posted @ 2012-07-04 15:12 lee0oo0 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 以Nesus s为例,由usb到听筒是Y轴;调节音量到开关屏幕为X轴;屏幕上方向为Z轴。 publicclassAccessSensorManagerActivityextendsActivity{ @OverridepublicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.main);SensorManagersensorManager=(SensorManager)getSystemService(Context.SENSOR_SERVI.. 阅读全文
posted @ 2012-07-04 10:49 lee0oo0 阅读(567) 评论(0) 推荐(0) 编辑