Merge branch 'mm' into qa_1.1.7
This commit is contained in:
@@ -25,6 +25,7 @@ import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.module.common.ModuleNames;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerExploreWayItem;
|
||||
import com.mogo.module.common.entity.MarkerLocation;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
@@ -50,7 +51,7 @@ import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
import com.mogo.utils.storage.SharedPrefsMgr;
|
||||
|
||||
import static com.mogo.module.v2x.VideoInitKt.initVideo;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -229,6 +230,12 @@ public class V2XModuleProvider implements
|
||||
Log.d(TAG,"onMarkerClicked2222");
|
||||
//点击的marker的具体数据
|
||||
MarkerExploreWay exploreWay = extractFromMarker(marker);
|
||||
MarkerExploreWayItem item = exploreWay.getItems().get(0);
|
||||
String path = item.getUrl();
|
||||
if (path.contains(".mp4")){
|
||||
initVideo();
|
||||
}
|
||||
|
||||
V2XRoadEventEntity roadEventEntity = new V2XRoadEventEntity();
|
||||
roadEventEntity.setNoveltyInfo(exploreWay);
|
||||
roadEventEntity.setPoiType(exploreWay.getPoiType());
|
||||
@@ -256,6 +263,7 @@ public class V2XModuleProvider implements
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// 响应违章停车的POI点击
|
||||
V2XServiceManager
|
||||
.getMogoRegisterCenter()
|
||||
|
||||
@@ -61,12 +61,12 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
false);
|
||||
shareEmptyViewHolder holder = new shareEmptyViewHolder(v);
|
||||
return holder;
|
||||
} else if (viewType == V2XShareEventItemEnum.ITEM_TYPE_LOAD_MORE_STATUS){
|
||||
} else if (viewType == V2XShareEventItemEnum.ITEM_TYPE_LOAD_MORE_STATUS) {
|
||||
View v = shareLayoutInflater.inflate(R.layout.item_v2x_event_share_load_more, parent,
|
||||
false);
|
||||
shareLoadStatusViewHolder holder = new shareLoadStatusViewHolder(v);
|
||||
return holder;
|
||||
}else {
|
||||
} else {
|
||||
View v = shareLayoutInflater.inflate(R.layout.footer_nomore_view, parent,
|
||||
false);
|
||||
shareLoadNoMoreViewHolder holder = new shareLoadNoMoreViewHolder(v);
|
||||
@@ -84,7 +84,7 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
if (data != null) {
|
||||
String shareNum = String.valueOf(data.getShareNum());
|
||||
String likeNum = String.valueOf(data.getLikeNum());
|
||||
double enthusiasmIndex = data.getEnthusiasmIndex();
|
||||
double enthusiasmIndex = data.getEnthusiasmIndex() <= 5 ? data.getEnthusiasmIndex() : 5;
|
||||
if (shareNum != null) {
|
||||
((shareDescriptionViewHolder) holder).shareNumTextView.setText(shareNum);
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
if (data != null) {
|
||||
String poitype = data.getPoiType();
|
||||
String address = data.getUploadAddress();
|
||||
String time = DateTimeUtils.getTimeText(data.getUploadTimestamp(),DateTimeUtils.MM_Yue_dd_Ri_HH_mm);
|
||||
String time = DateTimeUtils.getTimeText(data.getUploadTimestamp(), DateTimeUtils.MM_Yue_dd_Ri_HH_mm);
|
||||
String likeNum = String.valueOf(data.getLikeNum());
|
||||
String notLikeNum = String.valueOf(data.getNotlikeNum());
|
||||
|
||||
@@ -213,7 +213,8 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
|
||||
public shareLoadStatusViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
statusButton = itemView.findViewById(R.id.event_share_load_status);;
|
||||
statusButton = itemView.findViewById(R.id.event_share_load_status);
|
||||
;
|
||||
statusButton.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
@@ -225,8 +226,8 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
}
|
||||
|
||||
/*
|
||||
* 没有更多记录了
|
||||
* */
|
||||
* 没有更多记录了
|
||||
* */
|
||||
class shareLoadNoMoreViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
public shareLoadNoMoreViewHolder(@NonNull View itemView) {
|
||||
|
||||
@@ -213,7 +213,11 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
public fun showPanelWithSelectedItem(item: Int) {
|
||||
mV2XShareEventsFragment.fromVoice = true
|
||||
if (isPanelShow()) {
|
||||
selectWithItem(item)
|
||||
if (mRbShareEvents?.isChecked == true) {
|
||||
mV2XShareEventsFragment.ttsForVoiceCheck()
|
||||
} else {
|
||||
selectWithItem(item)
|
||||
}
|
||||
} else {
|
||||
showPanel()
|
||||
selectWithItem(item)
|
||||
|
||||
@@ -39,6 +39,7 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
public Boolean fromVoice = false;
|
||||
private int pageNum = 1;
|
||||
private V2XShareNetworkModel v2XShareNetworkModel;
|
||||
private V2XShareEventDescription resultData;
|
||||
|
||||
//动画
|
||||
private NetworkLoadingView loadingView;
|
||||
@@ -94,7 +95,7 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
@Override
|
||||
public void onSuccess(Object result) {
|
||||
if (result instanceof V2XShareEventDescription) {
|
||||
V2XShareEventDescription resultData = (V2XShareEventDescription) result;
|
||||
resultData = (V2XShareEventDescription) result;
|
||||
|
||||
if (resultData != null && resultData.getResult() != null
|
||||
&& resultData.getResult().getEnthusiasmIndex() != null) {
|
||||
@@ -104,7 +105,7 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
dataArrayList.add(resultData.getResult().getEnthusiasmIndex());
|
||||
if (fromVoice == true) {
|
||||
try {
|
||||
ttsWithResultData(resultData);
|
||||
ttsForVoiceCheck();
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
@@ -139,10 +140,10 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
/*
|
||||
* 语音打开我的分享,进行播报
|
||||
* */
|
||||
private void ttsWithResultData(V2XShareEventDescription data) {
|
||||
int shareNum = data.getResult().getEnthusiasmIndex().getShareNum();
|
||||
int approveNum = data.getResult().getEnthusiasmIndex().getLikeNum();
|
||||
double enthusiasm = data.getResult().getEnthusiasmIndex().getEnthusiasmIndex();
|
||||
public void ttsForVoiceCheck() {
|
||||
int shareNum = resultData.getResult().getEnthusiasmIndex().getShareNum();
|
||||
int approveNum = resultData.getResult().getEnthusiasmIndex().getLikeNum();
|
||||
double enthusiasm = resultData.getResult().getEnthusiasmIndex().getEnthusiasmIndex();
|
||||
Log.d(TAG, String.valueOf(enthusiasm)+"TTS播报热心指数个数");
|
||||
String ttsString = "";
|
||||
if (enthusiasm <= 2) {
|
||||
@@ -156,6 +157,7 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
+ "颗星,实至名归,老铁你就是大家一直赞扬的热心车友,请继续保持。";
|
||||
}
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice(ttsString, null);
|
||||
fromVoice = false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -19,15 +19,12 @@ import com.mogo.module.v2x.listener.V2XWindowStatusListener;
|
||||
import com.mogo.module.v2x.scenario.view.IV2XWindow;
|
||||
import com.mogo.module.v2x.view.SimpleCoverVideoPlayer;
|
||||
import com.mogo.utils.BitmapHelper;
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager;
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
|
||||
import com.shuyu.gsyvideoplayer.listener.VideoAllCallBack;
|
||||
import com.shuyu.gsyvideoplayer.utils.GSYVideoType;
|
||||
import com.shuyu.gsyvideoplayer.video.base.GSYVideoView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static com.mogo.module.v2x.VideoInitKt.initVideo;
|
||||
import static com.shuyu.gsyvideoplayer.utils.GSYVideoType.SCREEN_MATCH_FULL;
|
||||
|
||||
/**
|
||||
@@ -71,7 +68,6 @@ public class V2XRoadVideoWindow extends RelativeLayout implements
|
||||
|
||||
private void initView(Context context) {
|
||||
LayoutInflater.from(mContext).inflate(R.layout.window_road_video_layout, this);
|
||||
initVideo();
|
||||
playImageView = this.findViewById(R.id.window_video_play);
|
||||
thumbnailImage = this.findViewById(R.id.thumbnail_image);
|
||||
simpleCoverVideoPlayer = this.findViewById(R.id.roadVideoView);
|
||||
|
||||
Reference in New Issue
Block a user