摘要: 1,找到图片,设置图片的触摸事件。2,指定图片的缩放类型。清单文件代码: 1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 android:layout_width="match_parent" 3 android:layout_height="match_parent" 4 android:orientation="vertical" > 5 6 <!-- android:scaleType= 阅读全文
posted @ 2013-02-06 21:15 My_苦行僧 阅读(712) 评论(0) 推荐(0) 编辑
摘要: 传感器类型:方向、加速度(重力)、光线、磁场、距离(临近性)、温度等。 方向传感器: Sensor.TYPE_ORIENTATION 加速度(重力)传感器: Sensor.TYPE_ACCELEROMETER 光线传感器: Sensor.TYPE_LIGHT 磁场传感器: Sensor.TYPE_MAGNETIC_FIELD 距离(临近性)传感器: Sensor.TYPE_PROXIMITY 温度传感器: Sensor.TYPE_TEMPERATURE//获取某种类型的感应器Sensor sensor = sensorManager.getDefaultSensor(Sensor.TYPE_A 阅读全文
posted @ 2013-02-06 10:39 My_苦行僧 阅读(3331) 评论(0) 推荐(0) 编辑
摘要: Notification分为普通通知和自定义的两种,由图标、ticker(提示信息)、标题、内容、时间、事件组成,普通通知demo: 1 package com.android.hzynotification; 2 3 import android.app.Activity; 4 import android.app.Notification; 5 import android.app.NotificationManager; 6 import android.app.PendingIntent; 7 import android.content.Context; 8 import andr. 阅读全文
posted @ 2013-02-06 00:14 My_苦行僧 阅读(2379) 评论(0) 推荐(0) 编辑