@@ -17,14 +17,14 @@ import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.WarningStatusListener
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.utils.logger.Logger
|
||||
import kotlinx.android.synthetic.main.fragment_warning.*
|
||||
import kotlinx.android.synthetic.main.fragment_hmi.*
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/8/3 2:40 下午
|
||||
* 预警图层
|
||||
*/
|
||||
class MoGoWarningFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>(),
|
||||
class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>(),
|
||||
MoGoWarningContract.View {
|
||||
|
||||
var mWarningFloat: WarningFloat.Builder? = null
|
||||
@@ -32,7 +32,7 @@ class MoGoWarningFragment : MvpFragment<MoGoWarningContract.View?, WaringPresent
|
||||
override fun initViews() {}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.fragment_warning
|
||||
return R.layout.fragment_hmi
|
||||
}
|
||||
|
||||
override fun createPresenter(): WaringPresenter {
|
||||
@@ -13,7 +13,7 @@ import com.mogo.eagle.core.data.enums.WarningDirectionEnum;
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWaringProvider;
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.WarningStatusListener;
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst;
|
||||
import com.mogo.eagle.core.function.hmi.ui.MoGoWarningFragment;
|
||||
import com.mogo.eagle.core.function.hmi.ui.MoGoHmiFragment;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
@@ -26,7 +26,7 @@ import com.mogo.utils.logger.Logger;
|
||||
public class MoGoWarningProvider implements IMoGoWaringProvider {
|
||||
private String TAG = "MoGoWarningProvider";
|
||||
|
||||
private MoGoWarningFragment mMoGoWarningFragment;
|
||||
private MoGoHmiFragment mMoGoHmiFragment;
|
||||
private Context mContext;
|
||||
|
||||
@Override
|
||||
@@ -38,8 +38,8 @@ public class MoGoWarningProvider implements IMoGoWaringProvider {
|
||||
@Override
|
||||
public Fragment createCoverage(Context context, Bundle data) {
|
||||
Logger.d(TAG, "初始化蘑菇预警模块 Fragment……");
|
||||
mMoGoWarningFragment = new MoGoWarningFragment();
|
||||
return mMoGoWarningFragment;
|
||||
mMoGoHmiFragment = new MoGoHmiFragment();
|
||||
return mMoGoHmiFragment;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@@ -50,64 +50,64 @@ public class MoGoWarningProvider implements IMoGoWaringProvider {
|
||||
|
||||
@Override
|
||||
public void showWarningTrafficLight(int checkLightId) {
|
||||
mMoGoWarningFragment.showWarningTrafficLight(checkLightId);
|
||||
mMoGoHmiFragment.showWarningTrafficLight(checkLightId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disableWarningTrafficLight() {
|
||||
mMoGoWarningFragment.disableWarningTrafficLight();
|
||||
mMoGoHmiFragment.disableWarningTrafficLight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showLimitingVelocity(int limitingSpeed) {
|
||||
mMoGoWarningFragment.showLimitingVelocity(limitingSpeed);
|
||||
mMoGoHmiFragment.showLimitingVelocity(limitingSpeed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disableLimitingVelocity() {
|
||||
mMoGoWarningFragment.disableLimitingVelocity();
|
||||
mMoGoHmiFragment.disableLimitingVelocity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCountdownRed(int redNum) {
|
||||
mMoGoWarningFragment.changeCountdownRed(redNum);
|
||||
mMoGoHmiFragment.changeCountdownRed(redNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCountdownYellow(int yellowNum) {
|
||||
mMoGoWarningFragment.changeCountdownYellow(yellowNum);
|
||||
mMoGoHmiFragment.changeCountdownYellow(yellowNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCountdownGreen(int greenNum) {
|
||||
mMoGoWarningFragment.changeCountdownGreen(greenNum);
|
||||
mMoGoHmiFragment.changeCountdownGreen(greenNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCountdownTrafficLightNum(int readNum, int yellowNum, int greenNum) {
|
||||
mMoGoWarningFragment.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum);
|
||||
mMoGoHmiFragment.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showWarningV2X(int v2xType, @Nullable String alertContent,
|
||||
@Nullable String ttsContent, @Nullable String tag,
|
||||
@Nullable WarningStatusListener listener) {
|
||||
mMoGoWarningFragment.showWarningV2X(v2xType, alertContent, ttsContent, tag, listener);
|
||||
mMoGoHmiFragment.showWarningV2X(v2xType, alertContent, ttsContent, tag, listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disableWarningV2X(String tag) {
|
||||
mMoGoWarningFragment.disableWarningV2X(tag);
|
||||
mMoGoHmiFragment.disableWarningV2X(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showWarning(@NonNull WarningDirectionEnum direction) {
|
||||
mMoGoWarningFragment.showWarning(direction);
|
||||
mMoGoHmiFragment.showWarning(direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showWarning(@NonNull WarningDirectionEnum direction, long closeTime) {
|
||||
mMoGoWarningFragment.showWarning(direction, closeTime);
|
||||
mMoGoHmiFragment.showWarning(direction, closeTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user