¡@

Home 

2014/10/16 ¤W¤È 08:19:00

android Programming Glossary: mcustomdrawableview

Moving an image using Accelerometer of android

http://stackoverflow.com/questions/6457768/moving-an-image-using-accelerometer-of-android

extends Activity implements SensorEventListener Called when the activity is first created. CustomDrawableView mCustomDrawableView null ShapeDrawable mDrawable new ShapeDrawable int x int y private SensorManager sensorManager null Called when the activity.. savedInstanceState Get a reference to a SensorManager sensorManager SensorManager getSystemService SENSOR_SERVICE mCustomDrawableView new CustomDrawableView this setContentView mCustomDrawableView setContentView R.layout.main This method will update the.. SensorManager getSystemService SENSOR_SERVICE mCustomDrawableView new CustomDrawableView this setContentView mCustomDrawableView setContentView R.layout.main This method will update the UI on new sensor events public void onSensorChanged SensorEvent..