|
|
@@ -144,7 +144,6 @@ public class SettingActivity extends ActionBackActivity implements View.OnClickL
|
|
|
boolean sbb = isServiceRunning(uustep_service_name);
|
|
|
if (isServiceRunning(uustep_service_name)&&(isStep == -1 || isStep == 1)){
|
|
|
uu_step_reply.setChecked(true);
|
|
|
- speech_recognition_rl.setVisibility(View.VISIBLE);
|
|
|
}else {
|
|
|
speech_recognition_rl.setVisibility(View.GONE);
|
|
|
uu_step_reply.setChecked(false);
|
|
|
@@ -171,13 +170,23 @@ public class SettingActivity extends ActionBackActivity implements View.OnClickL
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
int last_isStep = PreferenceUtils.getInt(MyApplication.getInstance(), MainActivity.UU_STEP);
|
|
|
- if (isServiceRunning(uustep_service_name) && last_isStep == 1){
|
|
|
+ if (isServiceRunning(uustep_service_name) && last_isStep == 1) {
|
|
|
startActivity(new Intent(mContext, MyPedometerActivity.class));
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
Toast.makeText(mContext, "尚未开启UU运动,或已预关闭", Toast.LENGTH_SHORT).show();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ uu_step_rl.setOnLongClickListener(new View.OnLongClickListener() {
|
|
|
+ @Override
|
|
|
+ public boolean onLongClick(View v) {
|
|
|
+ if (isServiceRunning(uustep_service_name) && PreferenceUtils.getInt(MyApplication.getInstance(), MainActivity.UU_STEP) == 1){
|
|
|
+ speech_recognition_rl.setVisibility(View.VISIBLE);
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
speech_recognition_rl.setOnClickListener(this);
|
|
|
}
|