wait to finish and code has bug
This commit is contained in:
@@ -65,7 +65,7 @@ public class AdasAutoPilotManager implements IMogoOnMessageListener<AdasAutoPilo
|
||||
Logger.d(TAG, "onMsgReceived 接收到服务端调度信息,但现在已经在自动驾驶状态,下发重复 略过");
|
||||
return;
|
||||
}
|
||||
dispatchRemindDialog.show(adasAutoPilotLocReceiverBean.getPoiAddress());
|
||||
dispatchRemindDialog.showDialog(adasAutoPilotLocReceiverBean.getPoiAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,6 @@ public class AdasAutoPilotManager implements IMogoOnMessageListener<AdasAutoPilo
|
||||
}
|
||||
|
||||
public void test(){
|
||||
dispatchRemindDialog.show("123123123");
|
||||
dispatchRemindDialog.showDialog("123123123");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.module.adas.view;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -21,8 +22,8 @@ public class DispatchRemindDialog extends BaseFloatDialog {
|
||||
|
||||
private final TextView tvTimer;
|
||||
private final TextView tvLoc;
|
||||
private final TextView tvAffirm;
|
||||
private final TextView tvCancel;
|
||||
private final Button tvAffirm;
|
||||
private final Button tvCancel;
|
||||
|
||||
private final Handler handler = new Handler() {
|
||||
@Override
|
||||
@@ -31,7 +32,7 @@ public class DispatchRemindDialog extends BaseFloatDialog {
|
||||
if (msg.what == MSG_TYPE_TIMER) {
|
||||
if (TIMER >= 0) {
|
||||
TIMER--;
|
||||
tvTimer.setText(TIMER);
|
||||
tvTimer.setText(String.valueOf(TIMER));
|
||||
handler.sendEmptyMessage(MSG_TYPE_TIMER);
|
||||
} else {
|
||||
hideDialog();
|
||||
@@ -45,9 +46,9 @@ public class DispatchRemindDialog extends BaseFloatDialog {
|
||||
setContentView(R.layout.dialog_adas_dispatch_remind);
|
||||
tvTimer = findViewById(R.id.module_adas_dispatch_remind_timer);
|
||||
tvLoc = findViewById(R.id.module_adas_dispatch_remind_loc);
|
||||
tvAffirm = findViewById(R.id.module_adas_dispatch_remind_affirm);
|
||||
tvCancel = findViewById(R.id.module_adas_dispatch_remind_cancel);
|
||||
tvTimer.setText(TIMER);
|
||||
tvAffirm = (Button)findViewById(R.id.module_adas_dispatch_remind_affirm);
|
||||
tvCancel = (Button)findViewById(R.id.module_adas_dispatch_remind_cancel);
|
||||
tvTimer.setText(String.valueOf(TIMER));
|
||||
tvAffirm.setOnClickListener(v -> {
|
||||
if (mListener != null) {
|
||||
mListener.affirm();
|
||||
@@ -60,7 +61,7 @@ public class DispatchRemindDialog extends BaseFloatDialog {
|
||||
});
|
||||
}
|
||||
|
||||
public void show(String locContent) {
|
||||
public void showDialog(String locContent) {
|
||||
show();
|
||||
handler.sendEmptyMessage(MSG_TYPE_TIMER);
|
||||
tvLoc.setText(locContent);
|
||||
|
||||
Reference in New Issue
Block a user