如何在EditText
文本框中顯示由加速度計獲取的數據? 它只是使用TextView
在Android上的文本字段中顯示數據
public void onSensorChanged(SensorEvent event) {
float x,y,z;
x=event.values[0];
y=event.values[1];
z=event.values[2];
axex =(EditText)findViewById(R.id.editText1);
axex.setText(X+x+ms^2);
axey=(EditText)findViewById(R.id.editText2);
axey.setText(Y+y+ms^2);
axez=(EditText)findViewById(R.id.editText3);
axez.setText(Z+z+ms^2);
}
如果這是一個編程問題,那麼程序就會丟失。 – Snicolas 2012-04-26 19:52:33