Merge branch 'hea' into dev

This commit is contained in:
liujing
2020-09-24 17:22:42 +08:00
2 changed files with 38 additions and 0 deletions

View File

@@ -1,15 +1,19 @@
package com.mogo.module.v2x.adapter.holder;
import android.content.Intent;
import android.util.Log;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.voice.AIAssist;
import com.mogo.map.MogoLatLng;
import com.mogo.map.navi.IMogoNaviListener;
import com.mogo.map.navi.MogoNaviInfo;
import com.mogo.map.navi.MogoTraffic;
import com.mogo.module.carchattingprovider.ICarsChattingProvider;
import com.mogo.module.common.entity.MarkerExploreWay;
import com.mogo.module.common.entity.MarkerLocation;
import com.mogo.module.v2x.V2XConst;
@@ -20,6 +24,10 @@ import com.mogo.module.v2x.utils.TrackUtils;
import com.mogo.module.v2x.utils.V2XUtils;
import com.mogo.utils.TipToast;
import com.mogo.utils.logger.Logger;
import com.zhidao.carchattingprovider.CallChattingProviderConstant;
import com.zhidao.carchattingprovider.MogoDriverInfo;
import java.util.HashMap;
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
@@ -32,6 +40,9 @@ public abstract class V2XBaseViewHolder<T>
extends RecyclerView.ViewHolder
implements IMogoNaviListener {
private static final String TAG = "V2XBaseViewHolder";
private ICarsChattingProvider mCarsChattingProvider;
public V2XBaseViewHolder(@NonNull View itemView) {
super(itemView);
}
@@ -72,6 +83,28 @@ public abstract class V2XBaseViewHolder<T>
delayedCloseWindow();
}
public void triggerIVReportHead(MarkerExploreWay noveltyInfo) {
Log.d(TAG,"点击头像"+mCarsChattingProvider);
try {
mCarsChattingProvider = (ICarsChattingProvider) ARouter.getInstance().build(CallChattingProviderConstant.CAR_CALL_PROVIDER).navigation();
MogoDriverInfo mogoDriverInfo = new MogoDriverInfo();
int ageNumber = noveltyInfo.getUserInfo().getAgeNumber();
mogoDriverInfo.setAge(ageNumber);
String gender = noveltyInfo.getUserInfo().getGender();
mogoDriverInfo.setGender(gender != null ? gender:null);
String sn = noveltyInfo.getUserInfo().getSn();
mogoDriverInfo.setSn(sn != null ? sn:"");
String name = noveltyInfo.getUserInfo().getUserName();
mogoDriverInfo.setUserName(name != null ? name:"");
mogoDriverInfo.setUserHead(noveltyInfo.getUserInfo().getUserHead());
mCarsChattingProvider.showUserWindow(MODULE_NAME, mogoDriverInfo, this.itemView.getContext());
} catch (Exception e) {
Log.d(TAG,"点击头像发生错误--triggerIVReportHead"+e);
e.printStackTrace();
}
}
/**
* 打电话
*/
@@ -160,6 +193,7 @@ public abstract class V2XBaseViewHolder<T>
delayedCloseWindow();
}
/**
* 显示自定义 Toast
*

View File

@@ -239,6 +239,10 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
ivEventZan.setOnClickListener(v -> {
triggerZan(mNoveltyInfo);
});
ivReportHead.setOnClickListener(v->{
triggerIVReportHead(mNoveltyInfo);
});
}
} catch (Exception e) {
e.printStackTrace();