Commit de1620be authored by 马乐's avatar 马乐

1.调整地图布局

parent a13f3891
...@@ -11,6 +11,7 @@ import androidx.fragment.app.Fragment ...@@ -11,6 +11,7 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels import androidx.fragment.app.viewModels
import com.mapbox.maps.MapView import com.mapbox.maps.MapView
import com.mapbox.maps.MapboxMap import com.mapbox.maps.MapboxMap
import com.mapbox.maps.plugin.locationcomponent.location
import com.waytous.anticollision.R import com.waytous.anticollision.R
import com.waytous.anticollision.databinding.FragmentVideoHomeBinding import com.waytous.anticollision.databinding.FragmentVideoHomeBinding
import com.waytous.anticollision.utils.setTextSize import com.waytous.anticollision.utils.setTextSize
...@@ -40,8 +41,4 @@ class VideoHomeFragment : Fragment() { ...@@ -40,8 +41,4 @@ class VideoHomeFragment : Fragment() {
return binding.root return binding.root
} }
private fun initMapBox(){
}
} }
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="match_parent"
android:background="@drawable/drawable_bg_map_box" android:background="@drawable/drawable_bg_map_box"
tools:context=".ui.MainActivity"> tools:context=".ui.MainActivity">
...@@ -22,29 +22,29 @@ ...@@ -22,29 +22,29 @@
app:mapbox_scaleBarIsMetricUnits="true" app:mapbox_scaleBarIsMetricUnits="true"
app:mapbox_scaleBarMarginBottom="15dp" app:mapbox_scaleBarMarginBottom="15dp"
app:mapbox_scaleBarMarginRight="12dp" app:mapbox_scaleBarMarginRight="12dp"
app:mapbox_scaleBarRatio="0.1" app:mapbox_scaleBarRatio="0.2"
app:mapbox_scaleBarTextBarMargin="10dp" app:mapbox_scaleBarTextBarMargin="10dp"
app:mapbox_scaleBarTextBorderWidth="5dp" app:mapbox_scaleBarTextBorderWidth="5dp"
app:mapbox_scaleBarTextColor="@color/home_text_color" app:mapbox_scaleBarTextColor="@color/home_text_color"
app:mapbox_scaleBarTextSize="9sp"/> app:mapbox_scaleBarTextSize="9sp"/>
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/sos" android:id="@+id/sos"
style="@style/MapBoxButtonStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="14dp" android:layout_marginStart="28dp"
android:layout_marginTop="12dp" android:layout_marginTop="24dp"
android:adjustViewBounds="true"
android:contentDescription="@string/sos" android:contentDescription="@string/sos"
android:src="@drawable/background_sos_btn" android:src="@drawable/background_sos_btn"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/emergency" android:id="@+id/emergency"
style="@style/MapBoxButtonStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="11dp" android:layout_marginStart="22dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="20dp"
android:adjustViewBounds="true"
android:contentDescription="@string/emergency" android:contentDescription="@string/emergency"
android:src="@mipmap/icon_driving_state_emergency" android:src="@mipmap/icon_driving_state_emergency"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
...@@ -53,35 +53,35 @@ ...@@ -53,35 +53,35 @@
android:id="@+id/zoomLayout" android:id="@+id/zoomLayout"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="9dp" android:layout_marginTop="18dp"
android:layout_marginEnd="12dp" android:layout_marginEnd="24dp"
android:orientation="vertical" android:orientation="vertical"
app:divider="@drawable/zoom_divider_line" app:divider="@drawable/zoom_divider_line"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/zoomOut" android:id="@+id/zoomOut"
style="@style/MapBoxButtonStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1"
android:adjustViewBounds="true"
android:contentDescription="@string/zoom_out" android:contentDescription="@string/zoom_out"
android:src="@drawable/background_zoom_out" /> android:src="@drawable/background_zoom_out" />
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/zoomIn" android:id="@+id/zoomIn"
style="@style/MapBoxButtonStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1"
android:adjustViewBounds="true"
android:contentDescription="@string/zoom_in" android:contentDescription="@string/zoom_in"
android:src="@drawable/background_zoom_in" /> android:src="@drawable/background_zoom_in" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/locationTruck" android:id="@+id/locationTruck"
style="@style/MapBoxButtonStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="12dp" android:layout_marginEnd="24dp"
android:adjustViewBounds="true"
android:contentDescription="@string/location_truck" android:contentDescription="@string/location_truck"
android:src="@drawable/background_location_truck" android:src="@drawable/background_location_truck"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
...@@ -89,10 +89,10 @@ ...@@ -89,10 +89,10 @@
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/toggleSafetyRange" android:id="@+id/toggleSafetyRange"
style="@style/MapBoxButtonStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="24dp"
android:adjustViewBounds="true"
android:contentDescription="@string/toggle_safety_range" android:contentDescription="@string/toggle_safety_range"
android:src="@mipmap/icon_map_enable_safety_range_light" android:src="@mipmap/icon_map_enable_safety_range_light"
app:layout_constraintEnd_toEndOf="@id/locationTruck" app:layout_constraintEnd_toEndOf="@id/locationTruck"
......
...@@ -46,4 +46,9 @@ ...@@ -46,4 +46,9 @@
<item name="android:maxLength">8</item> <item name="android:maxLength">8</item>
<item name="android:textSize">20sp</item> <item name="android:textSize">20sp</item>
</style> </style>
<style name="MapBoxButtonStyle" parent="Theme.HTAnticollision">
<item name="android:adjustViewBounds">true</item>
<item name="android:clickable">true</item>
<item name="android:focusable">true</item>
</style>
</resources> </resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment