增加了测试面板收起功能。
This commit is contained in:
@@ -10,6 +10,7 @@ import android.widget.Button;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import com.google.android.flexbox.FlexboxLayout;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XPushMessageEntity;
|
||||
@@ -29,7 +30,8 @@ import java.util.List;
|
||||
* version: 1.0
|
||||
*/
|
||||
public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
|
||||
private FlexboxLayout mFlTestPanel;
|
||||
private Button mBtnTriggerOpen;
|
||||
private Button mBtnTriggerRoadEvent;
|
||||
private Button mBtnTriggerPushEvent;
|
||||
private Button mBtnTriggerPushLiveCarEvent;
|
||||
@@ -54,6 +56,8 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
private void initView(Context context) {
|
||||
LayoutInflater.from(context).inflate(R.layout.window_test_console, this);
|
||||
|
||||
mFlTestPanel = findViewById(R.id.flTestPanel);
|
||||
mBtnTriggerOpen = findViewById(R.id.btnTriggerOpen);
|
||||
mBtnTriggerRoadEvent = findViewById(R.id.btnTriggerRoadEvent);
|
||||
mBtnTriggerPushEvent = findViewById(R.id.btnTriggerPushEvent);
|
||||
mBtnTriggerPushLiveCarEvent = findViewById(R.id.btnTriggerPushLiveCarEvent);
|
||||
@@ -62,6 +66,8 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
mBtnTriggerSeekHelpEvent = findViewById(R.id.btnTriggerSeekHelpEvent);
|
||||
mBtnTriggerParkEvent = findViewById(R.id.btnTriggerParkEvent);
|
||||
|
||||
mBtnTriggerOpen.setOnClickListener(v -> mFlTestPanel.setVisibility(GONE));
|
||||
|
||||
mBtnTriggerRoadEvent.setOnClickListener(v -> {
|
||||
V2XMessageEntity<V2XRoadEventEntity> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioRoadEventData();
|
||||
|
||||
@@ -7,17 +7,31 @@
|
||||
android:paddingStart="@dimen/module_main_v2x_animation_width">
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/flTestPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/dp_150"
|
||||
android:paddingEnd="@dimen/dp_100"
|
||||
app:alignContent="flex_start"
|
||||
app:alignItems="center"
|
||||
app:flexDirection="row"
|
||||
android:paddingStart="@dimen/dp_150"
|
||||
app:flexWrap="wrap"
|
||||
app:justifyContent="flex_start">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerOpen"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:text="隐藏测试按钮面板"
|
||||
android:background="#FFF"
|
||||
android:textColor="#000"
|
||||
android:textSize="@dimen/dp_26"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerRoadEvent"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user