no message
This commit is contained in:
@@ -7,7 +7,9 @@ import android.view.ViewGroup;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.map.IDestroyable;
|
||||
import com.mogo.module.common.entity.V2XEventShowEntity;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.scenario.impl.AbsV2XScenario;
|
||||
@@ -15,6 +17,9 @@ import com.mogo.module.v2x.scenario.scene.livecar.V2XRoadLiveCarWindow;
|
||||
import com.mogo.module.v2x.scenario.view.IV2XWindow;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
import com.mogo.service.windowview.IMogoTopViewStatusListener;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.security.auth.DestroyFailedException;
|
||||
import javax.security.auth.Destroyable;
|
||||
@@ -26,8 +31,13 @@ public class V2XRoadVideoCarScenario extends AbsV2XScenario implements IMogoTopV
|
||||
@Override
|
||||
public void init(@Nullable V2XMessageEntity v2XMessageEntity) {
|
||||
Log.d(TAG, "init");
|
||||
setV2XMessageEntity(v2XMessageEntity);
|
||||
show();
|
||||
try {
|
||||
sV2XRoadVideoCarScenario.setV2XWindow(new V2XRoadVideoWindow());
|
||||
setV2XMessageEntity(v2XMessageEntity);
|
||||
show();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static V2XRoadVideoCarScenario getInstance() {
|
||||
@@ -42,9 +52,10 @@ public class V2XRoadVideoCarScenario extends AbsV2XScenario implements IMogoTopV
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
if (getV2XMessageEntity() != null && getV2XMessageEntity().getContent() != null) {
|
||||
Log.d(TAG,getV2XMessageEntity().toString()+"content-----"+getV2XMessageEntity().getContent());
|
||||
if (getV2XMessageEntity() != null) {
|
||||
showWindow();
|
||||
}
|
||||
showWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -106,6 +117,7 @@ public class V2XRoadVideoCarScenario extends AbsV2XScenario implements IMogoTopV
|
||||
|
||||
@Override
|
||||
public void onViewAdded(View view) {
|
||||
|
||||
Log.d(TAG, "onViewAdded");
|
||||
}
|
||||
|
||||
@@ -116,11 +128,13 @@ public class V2XRoadVideoCarScenario extends AbsV2XScenario implements IMogoTopV
|
||||
|
||||
@Override
|
||||
public void beforeViewAddAnim(View view) {
|
||||
|
||||
Log.d(TAG, "beforeViewAddAnim");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeViewRemoveAnim(View view) {
|
||||
|
||||
Log.d(TAG, "beforeViewRemoveAnim");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,33 +7,43 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.module.common.entity.V2XEventShowEntity;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.adapter.V2XRoadEventAdapter;
|
||||
import com.mogo.module.v2x.listener.V2XWindowStatusListener;
|
||||
import com.mogo.module.v2x.scenario.view.IV2XWindow;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class V2XRoadVideoWindow extends RelativeLayout implements IV2XWindow {
|
||||
|
||||
private static final String TAG = "V2XRoadVideoWindow";
|
||||
private RecyclerView mRecyclerView;
|
||||
private V2XRoadEventAdapter mV2XRoadEventAdapter;
|
||||
private List<V2XEventShowEntity> mItemList;
|
||||
|
||||
public V2XRoadVideoWindow() {
|
||||
this(V2XServiceManager.getContext());
|
||||
}
|
||||
|
||||
public V2XRoadVideoWindow(Context context) {
|
||||
super(context);
|
||||
initView(context);
|
||||
}
|
||||
|
||||
public V2XRoadVideoWindow(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public V2XRoadVideoWindow(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
|
||||
private void initView(Context context) {
|
||||
Log.d(TAG, "初始化视频播放器");
|
||||
mRecyclerView = findViewById(R.id.rvRoadEventList);
|
||||
mV2XRoadEventAdapter = new V2XRoadEventAdapter(mItemList);
|
||||
mRecyclerView.setAdapter(mV2XRoadEventAdapter);
|
||||
// 填充布局
|
||||
LayoutInflater.from(context).inflate(R.layout.window_road_video, this);
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
|
||||
mRecyclerView.setLayoutManager(layoutManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user