Merge remote-tracking branch 'origin/dev_merge_shunyi_vr_map' into dev_merge_shunyi_vr_map
# Conflicts: # modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java
This commit is contained in:
@@ -76,55 +76,60 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
try {
|
||||
|
||||
if (holder instanceof shareDescriptionViewHolder) {
|
||||
//分享次数,车友认同次数,热心指数
|
||||
if (dataArrayList.size() > position) {
|
||||
V2XShareEventDescription.ResultBean.EnthusiasmIndexBean data = (V2XShareEventDescription.ResultBean.EnthusiasmIndexBean) dataArrayList.get(position);
|
||||
if (data != null) {
|
||||
String shareNum = String.valueOf(data.getShareNum());
|
||||
String likeNum = String.valueOf(data.getLikeNum());
|
||||
double enthusiasmIndex = data.getEnthusiasmIndex() <= 5 ? data.getEnthusiasmIndex() : 5;
|
||||
if (shareNum != null) {
|
||||
((shareDescriptionViewHolder) holder).shareNumTextView.setText(shareNum);
|
||||
}
|
||||
if (likeNum != null) {
|
||||
((shareDescriptionViewHolder) holder).approveNumTextView.setText(likeNum);
|
||||
}
|
||||
((shareDescriptionViewHolder) holder).ratingBar.setRating((float) enthusiasmIndex);
|
||||
}
|
||||
}
|
||||
} else if (holder instanceof shareItemViewHolder) {
|
||||
//分享列表
|
||||
if (dataArrayList.size() > position) {
|
||||
V2XShareEventItem.ResultBean.PageBean.ContentBean data = (V2XShareEventItem.ResultBean.PageBean.ContentBean) dataArrayList.get(position);
|
||||
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 likeNum = String.valueOf(data.getLikeNum());
|
||||
String notLikeNum = String.valueOf(data.getNotlikeNum());
|
||||
|
||||
if (poitype != null) {
|
||||
((shareItemViewHolder) holder).caseStyleTextView.setText(EventTypeUtils.getPoiTypeStr(poitype));
|
||||
((shareItemViewHolder) holder).caseStyleTextView.setBackgroundResource(EventTypeUtils.getPoiTypeBgForShareItem(poitype));
|
||||
|
||||
}
|
||||
if (address != null) {
|
||||
((shareItemViewHolder) holder).caseAddressTextView.setText(address);
|
||||
}
|
||||
if (time != null) {
|
||||
((shareItemViewHolder) holder).caseTimeTextView.setText(time);
|
||||
}
|
||||
if (likeNum != null) {
|
||||
((shareItemViewHolder) holder).caseUsefulTextView.setText(likeNum);
|
||||
}
|
||||
if (notLikeNum != null) {
|
||||
((shareItemViewHolder) holder).caseUselessTextView.setText(notLikeNum);
|
||||
if (holder instanceof shareDescriptionViewHolder) {
|
||||
//分享次数,车友认同次数,热心指数
|
||||
if (dataArrayList.size() > position) {
|
||||
V2XShareEventDescription.ResultBean.EnthusiasmIndexBean data = (V2XShareEventDescription.ResultBean.EnthusiasmIndexBean) dataArrayList.get(position);
|
||||
if (data != null) {
|
||||
String shareNum = String.valueOf(data.getShareNum());
|
||||
String likeNum = String.valueOf(data.getLikeNum());
|
||||
double enthusiasmIndex = data.getEnthusiasmIndex() <= 5 ? data.getEnthusiasmIndex() : 5;
|
||||
if (shareNum != null) {
|
||||
((shareDescriptionViewHolder) holder).shareNumTextView.setText(shareNum);
|
||||
}
|
||||
if (likeNum != null) {
|
||||
((shareDescriptionViewHolder) holder).approveNumTextView.setText(likeNum);
|
||||
}
|
||||
((shareDescriptionViewHolder) holder).ratingBar.setRating((float) enthusiasmIndex);
|
||||
}
|
||||
}
|
||||
} else if (holder instanceof shareItemViewHolder) {
|
||||
//分享列表
|
||||
if (dataArrayList.size() > position) {
|
||||
V2XShareEventItem.ResultBean.PageBean.ContentBean data = (V2XShareEventItem.ResultBean.PageBean.ContentBean) dataArrayList.get(position);
|
||||
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 likeNum = String.valueOf(data.getLikeNum());
|
||||
String notLikeNum = String.valueOf(data.getNotlikeNum());
|
||||
|
||||
if (poitype != null) {
|
||||
((shareItemViewHolder) holder).caseStyleTextView.setText(EventTypeUtils.getPoiTypeStr(poitype));
|
||||
((shareItemViewHolder) holder).caseStyleTextView.setBackgroundResource(EventTypeUtils.getPoiTypeBgForShareItem(poitype));
|
||||
|
||||
}
|
||||
if (address != null) {
|
||||
((shareItemViewHolder) holder).caseAddressTextView.setText(address);
|
||||
}
|
||||
if (time != null) {
|
||||
((shareItemViewHolder) holder).caseTimeTextView.setText(time);
|
||||
}
|
||||
if (likeNum != null) {
|
||||
((shareItemViewHolder) holder).caseUsefulTextView.setText(likeNum);
|
||||
}
|
||||
if (notLikeNum != null) {
|
||||
((shareItemViewHolder) holder).caseUselessTextView.setText(notLikeNum);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +148,7 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
} else if (item instanceof V2XShareEventLoadMoreItem) {
|
||||
return ((V2XShareEventLoadMoreItem) dataArrayList.get(position)).getViewType();
|
||||
}
|
||||
return V2XShareEventItemEnum.ITEM_TYPE_SHARE_LIST;
|
||||
return V2XShareEventItemEnum.ITEM_TYPE_OTHER;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -26,6 +26,9 @@ import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
|
||||
|
||||
/**
|
||||
@@ -129,7 +132,11 @@ public class V2XIllegalParkVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
mExploreWay.getPoiType(),
|
||||
2);
|
||||
}
|
||||
delayedCloseWindow();
|
||||
if (!V2XServiceManager.getMoGoStatusManager().isVrMode()) {
|
||||
delayedCloseWindow();
|
||||
} else {
|
||||
mIlIllegalParkingLike.setClickable(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,6 +149,10 @@ public class V2XIllegalParkVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
mExploreWay.getPoiType(),
|
||||
3);
|
||||
}
|
||||
delayedCloseWindow();
|
||||
if (!V2XServiceManager.getMoGoStatusManager().isVrMode()) {
|
||||
delayedCloseWindow();
|
||||
} else {
|
||||
mIIllegalParkingUnLike.setClickable(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,5 +7,6 @@ public interface V2XShareEventItemEnum {
|
||||
int ITEM_TYPE_SHARE_EMPTY = 2;
|
||||
int ITEM_TYPE_LOAD_MORE_STATUS = 3;
|
||||
int ITEM_TYPE_NO_MORE = 4;
|
||||
int ITEM_TYPE_OTHER = 5;
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,9 @@ class OptimalSpeedMarker implements IV2XMarker<MogoLatLng> {
|
||||
.latitude(entity.getLat())
|
||||
.longitude(entity.getLon()).anchor(0.5f,0.9f).icon( ViewUtils.fromView(new OptimalSpeedMarkerView(V2XServiceManager.getContext())));
|
||||
optimalMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_OPTIMAL_SPEED_MARKER, optionsRipple);
|
||||
optimalMarker.setClickable(false);
|
||||
if (optimalMarker != null) {
|
||||
optimalMarker.setClickable(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.module.v2x.scenario.scene.test;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
@@ -257,6 +258,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
});
|
||||
|
||||
mBtnTriggerParkEvent.setOnClickListener(v -> {
|
||||
Log.d("触发违章停车事件", "00");
|
||||
V2XMessageEntity<List<MarkerExploreWay>> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XIllegalParkData();
|
||||
|
||||
|
||||
@@ -5,7 +5,10 @@ import android.animation.AnimatorInflater;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
@@ -26,6 +29,7 @@ public class HeartUnLikeView extends LinearLayout implements Animator.AnimatorLi
|
||||
private AnimatorSet mAnimatorSet;
|
||||
private OnClickCallListener mOnClickCallListener;
|
||||
private boolean isAnimator = false;
|
||||
private ImageView animationImageView;
|
||||
|
||||
public HeartUnLikeView(Context context) {
|
||||
this(context, null);
|
||||
@@ -39,7 +43,7 @@ public class HeartUnLikeView extends LinearLayout implements Animator.AnimatorLi
|
||||
super(context, attrs, defStyleAttr);
|
||||
inflate(context, V2XServiceManager.getMoGoStatusManager().isVrMode() ? R.layout.view_heart_unlike_vr : R.layout.view_heart_unlike, this);
|
||||
mIllegalParkingUnLike = findViewById(R.id.ivIllegalParkingUnLike);
|
||||
|
||||
animationImageView = findViewById(R.id.animationImage);
|
||||
setOnClickListener(v -> {
|
||||
if (!isAnimator) {
|
||||
isAnimator = true;
|
||||
@@ -53,6 +57,12 @@ public class HeartUnLikeView extends LinearLayout implements Animator.AnimatorLi
|
||||
}
|
||||
mAnimatorSet.start();
|
||||
}
|
||||
if (V2XServiceManager.getMoGoStatusManager().isVrMode()) {
|
||||
animationImageView.setVisibility(View.VISIBLE);
|
||||
Animation animation = AnimationUtils.loadAnimation(getContext(), R.anim.v2x_unlike_heart_scale_ani_vr);
|
||||
animationImageView.startAnimation(animation);
|
||||
animationImageView.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="2000">
|
||||
<scale
|
||||
android:fromXScale="1.0"
|
||||
android:fromYScale="1.0"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
android:repeatCount="0"
|
||||
android:toXScale="4"
|
||||
android:toYScale="4"></scale>
|
||||
<alpha
|
||||
android:fromAlpha="1.4"
|
||||
android:repeatCount="0"
|
||||
android:toAlpha="0.0"></alpha>
|
||||
|
||||
</set>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -6,16 +6,17 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:background="@drawable/v2x_bg_pop_up"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:paddingEnd="@dimen/dp_62">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/leftImageView"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:id="@+id/leftImageView"
|
||||
android:src="@drawable/bg_v2x_red_two_round_vr"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:src="@drawable/bg_v2x_red_two_round_vr"/>
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivIconP"
|
||||
@@ -23,9 +24,9 @@
|
||||
android:layout_height="@dimen/module_v2x_event_icon_size_vr"
|
||||
android:src="@drawable/icon_illegal_parking"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/leftImageView"
|
||||
app:layout_constraintEnd_toEndOf="@+id/leftImageView"
|
||||
app:layout_constraintStart_toStartOf="@+id/leftImageView"
|
||||
app:layout_constraintTop_toTopOf="@+id/leftImageView"
|
||||
app:layout_constraintEnd_toEndOf="@+id/leftImageView"/>
|
||||
app:layout_constraintTop_toTopOf="@+id/leftImageView" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tagEventType"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/llIllegalParkingUnLike"
|
||||
android:layout_width="@dimen/module_v2x_event_button_size"
|
||||
android:layout_height="@dimen/module_v2x_event_button_size"
|
||||
@@ -10,5 +10,20 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/module_common_unlike_vr" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/animationImage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignStart="@+id/ivIllegalParkingUnpaLike"
|
||||
android:layout_alignTop="@+id/ivIllegalParkingUnLike"
|
||||
android:layout_alignEnd="@+id/ivIllegalParkingUnLike"
|
||||
android:layout_alignBottom="@+id/ivIllegalParkingUnLike"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="9dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:visibility="invisible"
|
||||
android:src="@drawable/v2x_icon_unlike_animation_vr" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvRoadEventList"
|
||||
|
||||
Reference in New Issue
Block a user