Android动画效果Widget
请参照前面的飞行模式widget和wifi widget,不同代码:
private void handStateChanged(int state){
Message msg = mHandler.obtainMessage(BluetoothDefinition.START_ANIMATION);
msg.arg1 = 0;
switch (state) {
case BluetoothAdapter.STATE_TURNING_ON:
if (sIsOnClick) {
BluetoothDefinition.mRunAnimation = true;
mHandler.sendMessage(msg);
sIsOnClick = false;
}
break;
case BluetoothAdapter.STATE_ON:
BluetoothDefinition.mRunAnimation = false;
mHandler.sendEmptyMessage(BluetoothDefinition.END_ANIMATION);
break;
case BluetoothAdapter.STATE_TURNING_OFF:
if (sIsOnClick) {
mHandler.sendMessage(msg);
sIsOnClick = false;
}
break;
case BluetoothAdapter.STATE_OFF:
mHandler.sendEmptyMessage(BluetoothDefinition.END_ANIMATION);
break;
default:
}
}
补充:移动开发 , Android ,