直播框高度调整,层级关系调整

This commit is contained in:
liujing
2020-10-29 16:37:25 +08:00
parent 8d71f0d0da
commit a8728174b1
7 changed files with 33 additions and 18 deletions

View File

@@ -5,6 +5,7 @@ import android.view.View;
import com.mogo.module.common.entity.V2XEventShowEntity;
import com.mogo.module.common.entity.V2XMessageEntity;
import com.mogo.module.v2x.R;
import com.mogo.module.v2x.V2XConst;
import com.mogo.module.v2x.V2XServiceManager;
import com.mogo.module.v2x.scenario.impl.AbsV2XScenario;
@@ -77,11 +78,11 @@ public class V2XRoadLiveCarScenario extends AbsV2XScenario<List<V2XEventShowEnti
public void showWindow() {
Log.d(TAG,getV2XWindow().toString());
if (getV2XWindow() != null) {
V2XServiceManager
.getMogoTopViewManager()
.addSubView(getV2XWindow().getView(), this);
getV2XWindow().show(getV2XMessageEntity().getContent());
V2XServiceManager.getMoGoV2XStatusManager().setRoadLiveCarWindowShow(TAG, true);
V2XServiceManager
.getIMogoWindowManager()
.addView(getV2XWindow().getView(), 0, 0, false);
V2XServiceManager.getMoGoV2XStatusManager().setV2XAnimationWindowShow(TAG, true);
}
}

View File

@@ -193,13 +193,10 @@ public class V2XRoadLiveCarWindow extends RelativeLayout
runnableV2XEvent = null;
}
if (V2XServiceManager
.getMogoTopViewManager().isViewAdded(this)) {
//移除窗体
V2XServiceManager
.getMogoTopViewManager()
.removeSubView(this);
}
//移除窗体
V2XServiceManager
.getIMogoWindowManager()
.removeView(this);
}
@Override

View File

@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="@dimen/module_v2x_event_window_height"
android:layout_height="@dimen/v2x_video_window_height"
android:background="@drawable/v2x_alert_window_bg">
<com.mogo.module.v2x.view.V2XLiveGSYVideoView

View File

@@ -4,7 +4,10 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rlRoadEventDetail"
android:layout_width="match_parent"
android:layout_height="@dimen/module_v2x_event_window_height">
android:layout_height="@dimen/v2x_video_window_height"
android:background="@drawable/v2x_alert_window_bg"
android:layout_marginLeft="@dimen/v2x_right_context_magin"
android:layout_marginTop="@dimen/dp_22">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvRoadEventList"
@@ -23,7 +26,7 @@
android:id="@+id/tvEventStubClose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_25"
android:layout_marginRight="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:background="@drawable/bg_count_down"
android:paddingLeft="@dimen/dp_12"
@@ -33,17 +36,17 @@
android:text="30s"
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_30"
app:layout_constraintStart_toStartOf="@+id/rvRoadEventList"
app:layout_constraintEnd_toEndOf="@+id/rvRoadEventList"
app:layout_constraintTop_toTopOf="@+id/rvRoadEventList" />
<ImageView
android:layout_width="@dimen/dp_130"
android:layout_height="@dimen/dp_46"
android:layout_alignParentEnd="true"
android:layout_marginTop="@dimen/dp_28"
android:layout_marginEnd="@dimen/dp_28"
android:layout_marginLeft="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_20"
android:src="@drawable/v2x_icon_event_live_top"
app:layout_constraintEnd_toEndOf="@+id/rvRoadEventList"
app:layout_constraintStart_toStartOf="@+id/rvRoadEventList"
app:layout_constraintTop_toTopOf="@+id/rvRoadEventList" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -102,4 +102,9 @@
<dimen name="module_v2x_event_panel_btn_x">572px</dimen>
<dimen name="module_v2x_event_panel_in_launcher_btn_x">480px</dimen>
<dimen name="module_v2x_event_panel_btn_y">384px</dimen>
<!---->
<dimen name="v2x_right_context_magin">460px</dimen>
<dimen name="v2x_video_window_height">474px</dimen>
</resources>

View File

@@ -104,4 +104,8 @@
<dimen name="module_v2x_event_panel_in_launcher_btn_x">480px</dimen>
<dimen name="module_v2x_event_panel_btn_y">384px</dimen>
<!---->
<dimen name="v2x_right_context_magin">460px</dimen>
<dimen name="v2x_video_window_height">474px</dimen>
</resources>

View File

@@ -101,4 +101,9 @@
<dimen name="module_v2x_event_panel_in_launcher_btn_x">940px</dimen>
<dimen name="module_v2x_event_panel_btn_y">701px</dimen>
<!--适配直播框-->
<dimen name="v2x_right_context_magin">820px</dimen>
<dimen name="v2x_video_window_height">674px</dimen>
</resources>