[m1]
[1.0.2] [车模、地图定位]
This commit is contained in:
@@ -53,7 +53,6 @@ class BusPassengerRouteFragment :
|
||||
ToggleDebugView.toggleDebugView.toggle(requireContext())
|
||||
true
|
||||
}
|
||||
omvOverMap.hideResetView()
|
||||
viewBusPM1MsgBoxButton.setClickListener(object : MMsgBoxButtonView.ClickListener {
|
||||
override fun showMsgBoxList(show: Boolean) {
|
||||
if (show) {
|
||||
|
||||
BIN
OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bug_p_overmap_car_model.png
Executable file
BIN
OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bug_p_overmap_car_model.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
BIN
OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_atmosphere_select.png
Normal file → Executable file
BIN
OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_atmosphere_select.png
Normal file → Executable file
Binary file not shown.
|
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 251 KiB |
BIN
OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_select_right.png
Normal file → Executable file
BIN
OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_select_right.png
Normal file → Executable file
Binary file not shown.
|
Before Width: | Height: | Size: 208 KiB After Width: | Height: | Size: 205 KiB |
BIN
OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_overmap_reset.png
Executable file
BIN
OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_overmap_reset.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item
|
||||
android:drawable="@drawable/bus_p_overmap_reset"
|
||||
android:width="@dimen/dp_66"
|
||||
android:height="@dimen/dp_66"/>
|
||||
</layer-list >
|
||||
@@ -20,6 +20,10 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/mapBizView"
|
||||
app:resetDrawable="@drawable/bus_p_overmap_reset_size"
|
||||
app:carDrawable="@drawable/bug_p_overmap_car_model"
|
||||
app:resetDrawableMarginRight="34dp"
|
||||
app:resetDrawableMarginBottom="54dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
|
||||
@@ -66,6 +66,8 @@ class OverMapView @JvmOverloads constructor(
|
||||
private var arrivedDrawable: Int = -1
|
||||
private var unArrivedDrawable: Int = -1
|
||||
private var resetDrawable: Int = -1
|
||||
private var resetDrawableMarginRight: Int = -1
|
||||
private var resetDrawableMarginBottom: Int = -1
|
||||
|
||||
private var mMapView: TextureMapView? = null
|
||||
private var mAMap: AMap? = null
|
||||
@@ -121,6 +123,8 @@ class OverMapView @JvmOverloads constructor(
|
||||
unArrivedDrawable =
|
||||
typedArray.getResourceId(R.styleable.OverMapView_unArrivedDrawable, -1)
|
||||
resetDrawable = typedArray.getResourceId(R.styleable.OverMapView_resetDrawable, -1)
|
||||
resetDrawableMarginRight = typedArray.getResourceId(R.styleable.OverMapView_resetDrawableMarginRight, AutoSizeUtils.dp2px(context,40f))
|
||||
resetDrawableMarginBottom = typedArray.getResourceId(R.styleable.OverMapView_resetDrawableMarginBottom, AutoSizeUtils.dp2px(context,40f))
|
||||
typedArray.recycle()
|
||||
initView(context)
|
||||
} catch (e: Exception) {
|
||||
@@ -215,8 +219,16 @@ class OverMapView @JvmOverloads constructor(
|
||||
val smpView = LayoutInflater.from(context).inflate(R.layout.module_overview_map_view, this)
|
||||
mMapView = smpView.findViewById(R.id.aMapView)
|
||||
overLayerView = findViewById(R.id.overLayer)
|
||||
overLayerView?.background =
|
||||
resources.getDrawable(if (resetDrawable != -1) resetDrawable else R.drawable.amap_reset)
|
||||
overLayerView?.let {
|
||||
it.background =
|
||||
resources.getDrawable(if (resetDrawable != -1) resetDrawable else R.drawable.amap_reset)
|
||||
val layoutParams = it.layoutParams
|
||||
layoutParams as RelativeLayout.LayoutParams
|
||||
layoutParams.rightMargin =resetDrawableMarginRight
|
||||
layoutParams.bottomMargin =resetDrawableMarginBottom
|
||||
it.layoutParams = layoutParams
|
||||
}
|
||||
|
||||
arrivedBitmap =
|
||||
BitmapDescriptorFactory.fromResource(if (arrivedDrawable != -1) arrivedDrawable else R.drawable.taxi_map_arrow_arrived)
|
||||
unArrivedBitmap =
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/overLayer"
|
||||
android:layout_width="@dimen/dp_116"
|
||||
android:layout_height="@dimen/dp_116"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
|
||||
@@ -18,5 +18,9 @@
|
||||
<attr name="unArrivedDrawable" format="reference" />
|
||||
<!-- 重置位置图片 -->
|
||||
<attr name="resetDrawable" format="reference" />
|
||||
<!-- 重置位置图片右面margin -->
|
||||
<attr name="resetDrawableMarginRight" format="dimension" />
|
||||
<!-- 重置位置图片下面margin -->
|
||||
<attr name="resetDrawableMarginBottom" format="dimension" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user