Route 增加距离值显示

This commit is contained in:
2026-10-21 09:56:08 +08:00
parent c48a102afe
commit d4aa92cbf5
22 changed files with 234 additions and 75 deletions

View File

@@ -93,7 +93,7 @@ class MyApplication : Application() {
private fun initLocationServer() {
LogUtil.e("初始化定位服务")
//初始化定位服务,需要BaseActivity中startLocation()方法调用启动定位服务
if (AppUtils.isChina()) {
if (AppUtils.isChina(AppUtils.SWITCH_MAP_TYPE)) {
BaiduLocationManager.init(this)
} else {
GoogleLocationManager.init(this)

View File

@@ -978,7 +978,7 @@ abstract class BaseActivity<T : ViewBinding>(val inflater: (inflater: LayoutInfl
*/
fun startUpLocation() {
LogUtil.e("开始定位")
if (AppUtils.isChina()) {
if (AppUtils.isChina(AppUtils.SWITCH_MAP_TYPE)) {
//30秒定位一次,定位精度为高精度
BaiduLocationManager.startLocation(30)
} else {
@@ -991,7 +991,7 @@ abstract class BaseActivity<T : ViewBinding>(val inflater: (inflater: LayoutInfl
*/
private fun stopUpLocation() {
LogUtil.e("停止定位")
if (AppUtils.isChina()) {
if (AppUtils.isChina(AppUtils.SWITCH_MAP_TYPE)) {
BaiduLocationManager.stopLocation()
} else {
GoogleLocationManager.stopLocation()
@@ -1003,7 +1003,7 @@ abstract class BaseActivity<T : ViewBinding>(val inflater: (inflater: LayoutInfl
*/
private fun releaseLocationService() {
LogUtil.e("释放定位服务")
if (AppUtils.isChina()) {
if (AppUtils.isChina(AppUtils.SWITCH_MAP_TYPE)) {
BaiduLocationManager.releaseServer(this)
} else {
GoogleLocationManager.releaseServer(this)

View File

@@ -10,22 +10,26 @@ import kotlinx.parcelize.Parcelize
* @description:
*/
@Parcelize
data class HistoryDataBean(var dayTime: String,
var deviceId: String,
var deviceInfoId: String,
var historyPointId: String,
var latitude: Double,
var longitude: Double,
var address: String,
var positionMode: Int,
var timeStamp: Long,
var ledSwitch: Int,
var gnssSignal: Int,
var batteryLevel: Int,
var lightMode: Int,
@ConstantInt var inFance: Int,
var petName: String,
var petImgurl: String) : Parcelable {
constructor() : this("", "", "", "", 0.0, 0.0, "", 0, 0L, 0, 0, 0, 0, ConstantInt.GoodZone, "",
"")
data class HistoryDataBean(
var dayTime: String,
var deviceId: String,
var deviceInfoId: String,
var historyPointId: String,
var latitude: Double,
var longitude: Double,
var pointTotalDistance: Double,
var address: String,
var positionMode: Int,
var timeStamp: Long,
var ledSwitch: Int,
var gnssSignal: Int,
var batteryLevel: Int,
var lightMode: Int,
@ConstantInt var inFance: Int,
var petName: String,
var petImgurl: String
) : Parcelable {
constructor() : this(
"", "", "", "", 0.0, 0.0, 0.0, "", 0, 0L, 0, 0, 0, 0, ConstantInt.GoodZone, "", ""
)
}

View File

@@ -3,7 +3,6 @@ package com.abbidot.tracker.deprecated.ui.activity.data
import android.text.TextUtils
import android.view.View
import androidx.activity.viewModels
import androidx.fragment.app.commit
import com.abbidot.baselibrary.constant.MMKVKey
import com.abbidot.baselibrary.util.MMKVUtil
import com.abbidot.baselibrary.util.Utils
@@ -19,7 +18,6 @@ import com.abbidot.tracker.ui.common.map.HistoryDataMapCommon
import com.abbidot.tracker.util.Util
import com.abbidot.tracker.vm.DataDetailViewModel
import com.abbidot.tracker.vm.GeoCoderViewModel
import com.abbidot.tracker.widget.MapMarkerInfoView
import com.abbidot.tracker.widget.VerticalTopToBottomSeekBar
/**
@@ -52,12 +50,12 @@ class HistoryDataActivity :
mHistoryDataList = mutableListOf()
mHistoryDataMapCommon = HistoryDataMapCommon()
val fragment = mHistoryDataMapCommon.getMapFragment(
this, MapMarkerInfoView(mContext), mGeoCoderViewModel,VerticalTopToBottomSeekBar(mContext)
) {}
supportFragmentManager.commit {
add(R.id.history_data_map_view, fragment)
}
// val fragment = mHistoryDataMapCommon.getMapFragment(
// this, MapMarkerInfoView(mContext), mGeoCoderViewModel,VerticalTopToBottomSeekBar(mContext)
// ) {}
// supportFragmentManager.commit {
// add(R.id.history_data_map_view, fragment)
// }
val today = Utils.getCurrentTime(Utils.DATE_FORMAT_PATTERN_CN)
mViewBinding.historyDataHorizontalCalenderView.setOnDaySelectedListener { hasChanged, year, month, day, week, item ->

View File

@@ -1,6 +1,7 @@
package com.abbidot.tracker.ui.common.map
import android.content.Context
import android.view.ViewGroup
import androidx.appcompat.widget.AppCompatSeekBar
import androidx.fragment.app.Fragment
import com.abbidot.baselibrary.util.AppUtils
@@ -11,7 +12,6 @@ import com.abbidot.tracker.bean.PetBean
import com.abbidot.tracker.ui.fragment.map.baidumap.HistoryDataBaiduMapFragment
import com.abbidot.tracker.ui.fragment.map.googlemap.HistoryDataGoogleMapFragment
import com.abbidot.tracker.vm.GeoCoderViewModel
import com.abbidot.tracker.widget.MapMarkerInfoView
/**
*Created by .yzq on 2022/7/5/005.
@@ -25,7 +25,7 @@ class HistoryDataMapCommon : BaseMapCommon() {
fun getMapFragment(
context: Context,
markerInfoView: MapMarkerInfoView,
markerInfoView: ViewGroup,
geoCoderViewModel: GeoCoderViewModel,
verticalTopToBottomSeekBar: AppCompatSeekBar,
mapLoadOk: () -> Unit

View File

@@ -84,11 +84,11 @@ class RouteV2Fragment : BaseFragment<FragmentRouteV2Binding>(FragmentRouteV2Bind
getHomeV2Activity()?.edgeToEdgeAdapterBars(
root, WindowInsetsCompat.Type.statusBars()
)
mFragment = mHistoryDataMapCommon.getMapFragment(
mContext!!, miHomeRouteAddressView, mGeoCoderViewModel, vsbMapRouteLine
) {
mapLoadOk()
}
// mFragment = mHistoryDataMapCommon.getMapFragment(
// mContext!!, miHomeRouteAddressView, mGeoCoderViewModel, vsbMapRouteLine
// ) {
// mapLoadOk()
// }
ilHomeRoutePetHead.ivTopPetBtnSmall.visibility = View.GONE

View File

@@ -36,6 +36,8 @@ import com.abbidot.tracker.vm.DataDetailViewModel
import com.abbidot.tracker.vm.GeoCoderViewModel
import com.abbidot.tracker.widget.NoClickSlideSeekBar
import com.abbidot.tracker.widget.TypefaceTextView
import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo
import kotlinx.coroutines.launch
import kotlin.math.abs
import kotlin.math.atan2
@@ -112,6 +114,7 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
//是否是有效滑动
private var isValidMove = false
private var mDistanceUnit = ""
// private lateinit var mTopSlideLayoutManager: TopSlideLayoutManager
@@ -129,7 +132,7 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
root, WindowInsetsCompat.Type.statusBars()
)
mFragment = mHistoryDataMapCommon.getMapFragment(
mContext!!, miHomeRouteAddressViewV3, mGeoCoderViewModel, vsbMapRouteLineV3
mContext!!, ilHomeRouteAddressViewV3.root, mGeoCoderViewModel, vsbMapRouteLineV3
) {
mapLoadOk()
}
@@ -157,7 +160,8 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
ilHomeRoutePetHeadV3.homeDataPetNameSmall,
ivHomeRouteMapTypeBtnV3,
ivMapRouteLineV3LastBtn,
ivMapRouteLineV3NextBtn
ivMapRouteLineV3NextBtn,
ilHomeRouteAddressViewV3.root
)
llMapRouteLineV3ZoomingLayout.setOnTouchListener { _, event ->
@@ -180,6 +184,8 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
MotionEvent.ACTION_MOVE -> {
val dy = mLastY - event.rawY
if (abs(dy) > 50) {
mViewBinding.ilHomeRouteAddressViewV3.root.visibility =
View.INVISIBLE
val layoutParams = svHomeRouteMapScroll.layoutParams
val diff = (svHomeRouteMapScroll.height + dy).toInt()
isSlideUp = dy >= 0.0f
@@ -306,7 +312,7 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
private fun initState() {
mViewBinding.miHomeRouteAddressViewV3.visibility = View.GONE
mViewBinding.ilHomeRouteAddressViewV3.root.visibility = View.GONE
mHistoryDataMapCommon.clearAllMarker()
setSeekBarMax(0)
}
@@ -319,7 +325,7 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
return
}
mProgress = progress
mViewBinding.miHomeRouteAddressViewV3.visibility = View.GONE
mViewBinding.ilHomeRouteAddressViewV3.root.visibility = View.INVISIBLE
mHistoryDataMapCommon.slideChanged(progress)
}
@@ -453,13 +459,40 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
val timeString = Utils.formatTime(timeStamp * 1000, Utils.DATE_FORMAT_PATTERN_CN5)
//更新位置时间
dayTime = timeString
if (position > 0) {
var sumDis = 0.0
for (i in 0 until position - 1) {
val dis = Util.measureLatLonDistance(
mHistoryDataList[i].latitude,
mHistoryDataList[i].longitude,
mHistoryDataList[i + 1].latitude,
mHistoryDataList[i + 1].longitude
)
sumDis += dis
}
pointTotalDistance = sumDis
}
mViewBinding.ilHomeRouteAddressViewV3.let { mi ->
mi.root.visibility = View.VISIBLE
mi.tvMapAddressDistanceAddress.text = it
mi.tvMapAddressDistanceTime.text = timeString
val distanceStr = if (pointTotalDistance >= 1000) {
mDistanceUnit = Util.getMetricUnits(mContext!!, ConstantInt.Type4)
Util.metricConvertUnits(
(pointTotalDistance / 1000).toFloat(), ConstantInt.Type4, 2
).toString() + mDistanceUnit.lowercase()
} else {
mDistanceUnit = Util.getMetricUnits(mContext!!, ConstantInt.Type3)
Util.metricConvertUnits(
pointTotalDistance.toFloat(), ConstantInt.Type3, 2
).toString() + mDistanceUnit.lowercase()
}
mi.tvMapAddressDistanceDis.text = distanceStr
}
mViewBinding.root.postDelayed(
{
mViewBinding.miHomeRouteAddressViewV3.let { mi ->
mi.visibility = View.VISIBLE
mi.setShowText(timeString, it)
}
}, 100
mHistoryDataMapCommon.resetMarkerInfoViewOffset()
}, 200
)
}
}
@@ -713,10 +746,44 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
vsbMapRouteLineV3.progress += 1
mHistoryDataMapCommon.slideStopChanged(vsbMapRouteLineV3.progress)
}
ilHomeRouteAddressViewV3.root -> {
showAndHideAddress(v)
}
}
}
}
/**
* 显示隐藏地址信息
* @param v 点击的view
*/
private fun showAndHideAddress(v: View) {
mViewBinding.ilHomeRouteAddressViewV3.apply {
if (vMapAddressDistanceLine.isVisible) {
YoYo.with(Techniques.FadeOutUp).duration(100).onEnd {
tvMapAddressDistanceTime.setCompoundDrawablesWithIntrinsicBounds(
0, 0, R.drawable.icon_arrow_down_small, 0
)
vMapAddressDistanceLine.visibility = View.GONE
tvMapAddressDistanceAddress.visibility = View.GONE
}.playOn(tvMapAddressDistanceAddress)
} else {
YoYo.with(Techniques.FadeInDown).duration(100).onStart {
tvMapAddressDistanceTime.setCompoundDrawablesWithIntrinsicBounds(
0, 0, R.drawable.icon_arrow_up_small, 0
)
vMapAddressDistanceLine.visibility = View.VISIBLE
tvMapAddressDistanceAddress.visibility = View.VISIBLE
}.playOn(tvMapAddressDistanceAddress)
}
v.postDelayed({
mHistoryDataMapCommon.resetMarkerInfoViewOffset()
}, 160)
}
}
/**
* 两点间距离 单位米
@@ -769,9 +836,7 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
* 点到线段距离
*/
private fun pointToLineDist(
p: HistoryDataBean,
a: HistoryDataBean,
b: HistoryDataBean
p: HistoryDataBean, a: HistoryDataBean, b: HistoryDataBean
): Double {
val ax = a.longitude
val ay = a.latitude
@@ -790,12 +855,10 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
val nearX = ax + t * (bx - ax)
val nearY = ay + t * (by - ay)
return distanceBetween(
p1 = p,
p2 = HistoryDataBean().apply {
p1 = p, p2 = HistoryDataBean().apply {
latitude = nearY
longitude = nearX
}
)
})
}
/**
@@ -803,8 +866,7 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
* @param step 插值个数 推荐2~3
*/
private fun latLngInterpolate(
points: List<HistoryDataBean>,
step: Int = 2
points: List<HistoryDataBean>, step: Int = 2
): List<HistoryDataBean> {
if (points.size < 2) return points
val result = mutableListOf<HistoryDataBean>()
@@ -830,9 +892,7 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
* GPS降噪,过滤跳点漂移
*/
private fun filterNoisePoint(
data: List<HistoryDataBean>,
minDis: Double = 5.0,
maxDis: Double = 60.0
data: List<HistoryDataBean>, minDis: Double = 5.0, maxDis: Double = 60.0
): List<HistoryDataBean> {
if (data.isEmpty()) return emptyList()
val res = mutableListOf<HistoryDataBean>().apply { add(data.first()) }

View File

@@ -4,9 +4,11 @@ import android.content.Context
import android.graphics.Point
import android.graphics.Typeface
import android.view.MotionEvent
import android.view.ViewGroup
import androidx.appcompat.widget.AppCompatSeekBar
import androidx.core.view.isVisible
import com.abbidot.baselibrary.constant.MMKVKey
import com.abbidot.baselibrary.util.AppUtils
import com.abbidot.baselibrary.util.LogUtil
import com.abbidot.baselibrary.util.MMKVUtil
import com.abbidot.tracker.R
@@ -16,7 +18,6 @@ import com.abbidot.tracker.constant.ConstantInt
import com.abbidot.tracker.ui.fragment.map.googlemap.GoogleBitmapHelper
import com.abbidot.tracker.util.ViewUtil
import com.abbidot.tracker.vm.GeoCoderViewModel
import com.abbidot.tracker.widget.MapMarkerInfoView
import com.baidu.mapapi.map.BaiduMap
import com.baidu.mapapi.map.BitmapDescriptor
import com.baidu.mapapi.map.BitmapDescriptorFactory
@@ -34,7 +35,7 @@ class HistoryDataBaiduMapFragment : BaseBaiduMapFragment() {
// private val mScreenshotsViewModel: ScreenshotsViewModel by viewModels()
private lateinit var mGeoCoderViewModel: GeoCoderViewModel
private lateinit var mMarkerInfoView: MapMarkerInfoView
private lateinit var mMarkerInfoView: ViewGroup
private lateinit var mVerticalTopToBottomSeekBar: AppCompatSeekBar
private var mLatLngList = mutableListOf<LatLng>()
@@ -54,7 +55,7 @@ class HistoryDataBaiduMapFragment : BaseBaiduMapFragment() {
@JvmStatic
fun newInstance(
context: Context,
markerInfoView: MapMarkerInfoView,
markerInfoView: ViewGroup,
geoCoderViewModel: GeoCoderViewModel,
verticalTopToBottomSeekBar: AppCompatSeekBar,
mapLoadOk: () -> Unit
@@ -190,7 +191,17 @@ class HistoryDataBaiduMapFragment : BaseBaiduMapFragment() {
mGeoCoderViewModel.getLatLonAddress(
mLatLngList[maxIndex].latitude, mLatLngList[maxIndex].longitude, false
)
setMarkerInfoViewOffset(mMarkerInfoView, mLatLngList[maxIndex])
setMapAddressLocationOffset(mMarkerInfoView, mLatLngList[maxIndex])
}
/**
* 设置Marker弹窗设备电量的位置
*/
fun setMapAddressLocationOffset(viewGroup: ViewGroup, latLng: LatLng) {
mBaiduMap?.projection?.toScreenLocation(latLng)?.let {
viewGroup.x = it.x.toFloat() - viewGroup.width / 2 + AppUtils.dpToPx(5)
viewGroup.y = it.y.toFloat() - AppUtils.dpToPx(56) - viewGroup.height
}
}
suspend fun setPetBean(petBean: PetBean) {
@@ -214,7 +225,7 @@ class HistoryDataBaiduMapFragment : BaseBaiduMapFragment() {
fun resetMarkerInfoViewOffset() {
mCurLatLng?.let {
if (mMarkerInfoView.isVisible) setMarkerInfoViewOffset(mMarkerInfoView, it)
if (mMarkerInfoView.isVisible) setMapAddressLocationOffset(mMarkerInfoView, it)
}
}
@@ -240,7 +251,7 @@ class HistoryDataBaiduMapFragment : BaseBaiduMapFragment() {
)
mCurLatLng = mLatLngList[progress]
setMarkerInfoViewOffset(mMarkerInfoView, mLatLngList[progress])
setMapAddressLocationOffset(mMarkerInfoView, mLatLngList[progress])
}
}

View File

@@ -1143,6 +1143,7 @@ abstract class BaseGoogleMapFragment :
}
}
/**
* 设置Marker弹窗设备电量的位置
*/

View File

@@ -2,8 +2,8 @@ package com.abbidot.tracker.ui.fragment.map.googlemap
import android.content.Context
import android.graphics.Typeface
import android.view.ViewGroup
import androidx.appcompat.widget.AppCompatSeekBar
import androidx.core.view.isVisible
import com.abbidot.baselibrary.constant.MMKVKey
import com.abbidot.baselibrary.util.AppUtils
import com.abbidot.baselibrary.util.LogUtil
@@ -14,7 +14,6 @@ import com.abbidot.tracker.bean.PetBean
import com.abbidot.tracker.constant.ConstantInt
import com.abbidot.tracker.util.ViewUtil
import com.abbidot.tracker.vm.GeoCoderViewModel
import com.abbidot.tracker.widget.MapMarkerInfoView
import com.google.android.gms.maps.GoogleMap
import com.google.android.gms.maps.model.BitmapDescriptor
import com.google.android.gms.maps.model.BitmapDescriptorFactory
@@ -30,7 +29,7 @@ class HistoryDataGoogleMapFragment : BaseGoogleMapFragment() {
// private val mScreenshotsViewModel: ScreenshotsViewModel by viewModels()
private lateinit var mGeoCoderViewModel: GeoCoderViewModel
private lateinit var mMarkerInfoView: MapMarkerInfoView
private lateinit var mMarkerInfoView: ViewGroup
private lateinit var mVerticalTopToBottomSeekBar: AppCompatSeekBar
private val mMarkerOptions = MarkerOptions()
@@ -52,7 +51,7 @@ class HistoryDataGoogleMapFragment : BaseGoogleMapFragment() {
@JvmStatic
fun newInstance(
context: Context,
markerInfoView: MapMarkerInfoView,
markerInfoView: ViewGroup,
geoCoderViewModel: GeoCoderViewModel,
verticalTopToBottomSeekBar: AppCompatSeekBar,
mapLoadOk: () -> Unit
@@ -120,7 +119,19 @@ class HistoryDataGoogleMapFragment : BaseGoogleMapFragment() {
fun resetMarkerInfoViewOffset() {
mCurLatLng?.let {
if (mMarkerInfoView.isVisible) setMarkerInfoViewOffset(mMarkerInfoView, it)
setMapAddressLocationOffset(mMarkerInfoView, it)
}
}
/**
* 设置Marker弹窗 的位置
*/
fun setMapAddressLocationOffset(viewGroup: ViewGroup, latLng: LatLng) {
LogUtil.e("xxxx $latLng},${viewGroup.width},${viewGroup.height}")
val newLatLng = toGCJ02LatLon(latLng)
mGoogleMap?.projection?.toScreenLocation(newLatLng)?.let {
viewGroup.x = it.x.toFloat() - viewGroup.width / 2
viewGroup.y = it.y.toFloat() - AppUtils.dpToPx(56) - viewGroup.height
}
}
@@ -183,7 +194,6 @@ class HistoryDataGoogleMapFragment : BaseGoogleMapFragment() {
mGeoCoderViewModel.getLatLonAddress(
mLatLngList[maxIndex].latitude, mLatLngList[maxIndex].longitude, false
)
setMarkerInfoViewOffset(mMarkerInfoView, mLatLngList[maxIndex])
}
/**
@@ -206,7 +216,7 @@ class HistoryDataGoogleMapFragment : BaseGoogleMapFragment() {
)
mCurLatLng = mLatLngList[progress]
setMarkerInfoViewOffset(mMarkerInfoView, mLatLngList[progress])
resetMarkerInfoViewOffset()
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

View File

@@ -23,6 +23,7 @@
android:layout_height="match_parent" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ll_home_map_device_battery_layout"
android:layout_width="wrap_content"

View File

@@ -29,10 +29,16 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.abbidot.tracker.widget.MapMarkerInfoView
android:id="@+id/mi_home_route_address_view_v3"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- <com.abbidot.tracker.widget.MapMarkerInfoView-->
<!-- android:id="@+id/mi_home_route_address_view_v3"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent" />-->
<include
android:id="@+id/il_home_route_address_view_v3"
layout="@layout/layout_map_address_distance"
android:visibility="invisible" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_home_route_map_type_btn_v3"

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_8"
android:background="@drawable/shape8_white_bg"
android:paddingTop="@dimen/dp_4"
android:paddingBottom="@dimen/dp_6">
<com.abbidot.tracker.widget.TypefaceTextView
android:id="@+id/tv_map_address_distance_dis"
style="@style/my_TextView_style_v2"
android:layout_marginEnd="@dimen/dp_2"
android:paddingStart="@dimen/dp_6"
android:text="0 km"
android:textColor="@color/select_color"
android:textSize="@dimen/textSize12"
app:typeface="@string/roboto_bold_font" />
<com.abbidot.tracker.widget.TypefaceTextView
android:id="@+id/tv_map_address_distance_time"
style="@style/my_TextView_style_v2"
android:layout_alignBaseline="@id/tv_map_address_distance_dis"
android:layout_toEndOf="@id/tv_map_address_distance_dis"
android:drawableEnd="@drawable/icon_arrow_down_small"
android:drawablePadding="@dimen/dp_4"
android:paddingEnd="@dimen/dp_6"
android:text="@string/txt_powered_off"
android:textColor="@color/select_color3"
android:textSize="@dimen/textSize10"
app:typeface="@string/roboto_regular_font" />
<View
android:id="@+id/v_map_address_distance_line"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_05"
android:layout_below="@id/tv_map_address_distance_dis"
android:layout_alignStart="@id/tv_map_address_distance_dis"
android:layout_alignEnd="@id/tv_map_address_distance_time"
android:layout_marginVertical="@dimen/dp_2"
android:background="@color/main_back"
android:visibility="gone" />
<com.abbidot.tracker.widget.TypefaceTextView
android:id="@+id/tv_map_address_distance_address"
style="@style/my_TextView_style_v2"
android:layout_below="@id/v_map_address_distance_line"
android:drawableStart="@drawable/icon_location_gray_small"
android:drawablePadding="@dimen/dp_4"
android:paddingHorizontal="@dimen/dp_6"
android:text="@string/app_name"
android:textColor="@color/select_color3"
android:textSize="@dimen/textSize10"
android:visibility="gone"
app:typeface="@string/roboto_regular_font" />
</RelativeLayout>
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:src="@drawable/icon_white_trigon" />
</FrameLayout>