增加了分享音乐的Marker分类
This commit is contained in:
@@ -231,7 +231,7 @@ public class MarkerServiceHandler {
|
||||
}
|
||||
|
||||
}
|
||||
getMapUIController().changeZoom(12);
|
||||
getMapUIController().changeZoom(10);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
import com.mogo.module.common.entity.MarkerShareMusic;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.service.R;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
@@ -79,13 +80,29 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
|
||||
ivReverseTriangle.setImageResource(R.drawable.bg_shape_reverse_triangle_purple);
|
||||
}
|
||||
}
|
||||
loadImageWithMarker(markerShowEntity);
|
||||
break;
|
||||
case ServiceConst
|
||||
.CARD_TYPE_ROAD_CONDITION:
|
||||
break;
|
||||
case ServiceConst
|
||||
.CARD_TYPE_SHARE_MUSIC:
|
||||
ivIconForeground.setVisibility(View.VISIBLE);
|
||||
if (bindObj instanceof MarkerShareMusic) {
|
||||
// 2 为书籍听书,3 为新闻,1 为qq音乐,int
|
||||
switch (((MarkerShareMusic) bindObj).getShareType()) {
|
||||
case 1:
|
||||
ivUserHead.setImageResource(R.drawable.icon_map_marker_misic);
|
||||
break;
|
||||
case 2:
|
||||
ivUserHead.setImageResource(R.drawable.icon_map_marker_book);
|
||||
break;
|
||||
case 3:
|
||||
ivUserHead.setImageResource(R.drawable.icon_map_marker_news);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// ivIconForeground.setVisibility(View.VISIBLE);
|
||||
llMarkerContent.setBackgroundResource(R.drawable.bg_map_marker_purple_info);
|
||||
ivReverseTriangle.setImageResource(R.drawable.bg_shape_reverse_triangle_purple);
|
||||
break;
|
||||
@@ -95,7 +112,6 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
|
||||
if (!TextUtils.isEmpty(markerShowEntity.getTextContent())) {
|
||||
tvMarkerContent.setText(markerShowEntity.getTextContent());
|
||||
}
|
||||
loadImageWithMarker(markerShowEntity);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.widget.ImageView;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
import com.mogo.module.common.entity.MarkerShareMusic;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.service.R;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
@@ -71,20 +72,34 @@ public class MapMarkerView extends MapMarkerBaseView {
|
||||
ivBg.setImageResource(R.drawable.bg_map_marker_purple);
|
||||
}
|
||||
}
|
||||
loadImageWithMarker(markerShowEntity);
|
||||
break;
|
||||
case ServiceConst
|
||||
.CARD_TYPE_ROAD_CONDITION:
|
||||
break;
|
||||
case ServiceConst
|
||||
.CARD_TYPE_SHARE_MUSIC:
|
||||
ivIconForeground.setVisibility(View.VISIBLE);
|
||||
if (bindObj instanceof MarkerShareMusic) {
|
||||
// 2 为书籍听书,3 为新闻,1 为qq音乐,int
|
||||
switch (((MarkerShareMusic) bindObj).getShareType()) {
|
||||
case 1:
|
||||
ivUserHead.setImageResource(R.drawable.icon_map_marker_misic);
|
||||
break;
|
||||
case 2:
|
||||
ivUserHead.setImageResource(R.drawable.icon_map_marker_book);
|
||||
break;
|
||||
case 3:
|
||||
ivUserHead.setImageResource(R.drawable.icon_map_marker_news);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// ivIconForeground.setVisibility(View.VISIBLE);
|
||||
ivBg.setImageResource(R.drawable.bg_map_marker_purple);
|
||||
break;
|
||||
}
|
||||
ivCar.setRotation((float) markerShowEntity.getMarkerLocation().getAngle());
|
||||
|
||||
loadImageWithMarker(markerShowEntity);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 905 B |
@@ -11,7 +11,7 @@
|
||||
android:id="@+id/ivCar"
|
||||
android:layout_width="@dimen/dp_34"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:src="@drawable/icon_map_marker_car_blue"
|
||||
android:src="@drawable/icon_map_marker_car_gray"
|
||||
android:translationY="-5dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/ivBg"
|
||||
app:layout_constraintStart_toStartOf="@+id/ivBg"
|
||||
@@ -22,7 +22,7 @@
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_85"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/bg_map_marker_blue"
|
||||
android:src="@drawable/bg_map_marker_green"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -33,7 +33,6 @@
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:background="@drawable/icon_default"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
android:id="@+id/ivCar"
|
||||
android:layout_width="@dimen/dp_34"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:src="@drawable/icon_map_marker_car_blue"
|
||||
android:src="@drawable/icon_map_marker_car_gray"
|
||||
android:translationY="-5dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/ivReverseTriangle"
|
||||
app:layout_constraintStart_toStartOf="@+id/ivReverseTriangle"
|
||||
@@ -31,7 +31,6 @@
|
||||
android:id="@+id/ivUserHead"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:background="@drawable/icon_default"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:miv_failureHolder="@drawable/icon_default"
|
||||
|
||||
Reference in New Issue
Block a user