From abba443edcac8746fd973fafb34e9741050fe26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Mon, 6 Jan 2020 19:58:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=9C=B0=E5=9B=BEMa?= =?UTF-8?q?rker=E8=87=AA=E5=AE=9A=E4=B9=89=E7=BB=84=E5=90=88=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/marker/MapMarkerInfoView.java | 42 +++++++++++++++++++ .../module/service/marker/MapMarkerView.java | 42 +++++++++++++++++++ ...p_marker_green.xml => view_map_marker.xml} | 0 ...reen_info.xml => view_map_marker_info.xml} | 0 4 files changed, 84 insertions(+) create mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerInfoView.java create mode 100644 modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java rename modules/mogo-module-service/src/main/res/layout/{view_map_marker_green.xml => view_map_marker.xml} (100%) rename modules/mogo-module-service/src/main/res/layout/{view_map_marker_green_info.xml => view_map_marker_info.xml} (100%) diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerInfoView.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerInfoView.java new file mode 100644 index 0000000000..4e2d773096 --- /dev/null +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerInfoView.java @@ -0,0 +1,42 @@ +package com.mogo.module.service.marker; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.LayoutInflater; +import android.widget.LinearLayout; + +import androidx.annotation.Nullable; + +import com.mogo.module.service.R; + +/** + * author : donghongyu + * e-mail : 1358506549@qq.com + * date : 2020-01-0619:55 + * desc : 地图Marker图标带文本信息 + * version: 1.0 + */ +public class MapMarkerInfoView extends LinearLayout { + public MapMarkerInfoView(Context context) { + super(context); + initView(context); + } + + public MapMarkerInfoView(Context context, @Nullable AttributeSet attrs) { + super(context, attrs); + initView(context); + } + + public MapMarkerInfoView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + initView(context); + } + + + private void initView(Context context) { + + LayoutInflater.from(context).inflate(R.layout.view_map_marker_info, this); + + } + +} diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java new file mode 100644 index 0000000000..d288cfa493 --- /dev/null +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerView.java @@ -0,0 +1,42 @@ +package com.mogo.module.service.marker; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.LayoutInflater; +import android.widget.LinearLayout; + +import androidx.annotation.Nullable; + +import com.mogo.module.service.R; + +/** + * author : donghongyu + * e-mail : 1358506549@qq.com + * date : 2020-01-0619:55 + * desc : 地图Marker图标 + * version: 1.0 + */ +public class MapMarkerView extends LinearLayout { + public MapMarkerView(Context context) { + super(context); + initView(context); + } + + public MapMarkerView(Context context, @Nullable AttributeSet attrs) { + super(context, attrs); + initView(context); + } + + public MapMarkerView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + initView(context); + } + + + private void initView(Context context) { + + LayoutInflater.from(context).inflate(R.layout.view_map_marker, this); + + } + +} \ No newline at end of file diff --git a/modules/mogo-module-service/src/main/res/layout/view_map_marker_green.xml b/modules/mogo-module-service/src/main/res/layout/view_map_marker.xml similarity index 100% rename from modules/mogo-module-service/src/main/res/layout/view_map_marker_green.xml rename to modules/mogo-module-service/src/main/res/layout/view_map_marker.xml diff --git a/modules/mogo-module-service/src/main/res/layout/view_map_marker_green_info.xml b/modules/mogo-module-service/src/main/res/layout/view_map_marker_info.xml similarity index 100% rename from modules/mogo-module-service/src/main/res/layout/view_map_marker_green_info.xml rename to modules/mogo-module-service/src/main/res/layout/view_map_marker_info.xml