new#适配联想pad
This commit is contained in:
@@ -26,6 +26,7 @@ import com.zhidao.carchattingprovider.MogoDriverInfo;
|
||||
import java.util.List;
|
||||
|
||||
import static android.text.style.TtsSpan.GENDER_MALE;
|
||||
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
||||
|
||||
/**
|
||||
* V2X 测试面板广播接收,目的是可以通过广播调用起来面板
|
||||
@@ -166,6 +167,13 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
|
||||
V2XServiceManager.getMapService().getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_MEDIUM_SIGHT);
|
||||
} else if (sceneType == 20) { //test visualAngle UI
|
||||
V2XServiceManager.getMapService().getMapUIController().changeMapVisualAngle(VisualAngleMode.MODE_CLOSE_SIGHT);
|
||||
} else if (sceneType == 21) {// 自车求助
|
||||
V2XMessageEntity<Boolean> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioCarForHelpEventData();
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent);
|
||||
V2XServiceManager.getMoGoStatusManager().setSeekHelping(MODULE_NAME, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ public class V2XSeekHelpButton implements IV2XButton {
|
||||
doAction();
|
||||
});
|
||||
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
(int) V2XUtils.getApp().getResources().getDimension(R.dimen.dp_150));
|
||||
(int) V2XUtils.getApp().getResources().getDimension(R.dimen.module_v2x_car_for_help_window_height));
|
||||
V2XServiceManager.getMogoTopViewManager().addView(topView, layoutParams);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,4 +465,25 @@ public class TestOnLineCarUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* 自车求助测试数据
|
||||
*/
|
||||
public static V2XMessageEntity<Boolean> getV2XScenarioCarForHelpEventData() {
|
||||
try {
|
||||
|
||||
V2XMessageEntity<Boolean> v2xMessageEntity = new V2XMessageEntity<>();
|
||||
// 控制类型
|
||||
v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP);
|
||||
// 设置数据
|
||||
v2xMessageEntity.setContent(true);
|
||||
// 控制展示状态
|
||||
v2xMessageEntity.setShowState(true);
|
||||
return v2xMessageEntity;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user