Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
HTAnticollision
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马乐
HTAnticollision
Commits
5c819d33
Commit
5c819d33
authored
Jun 01, 2023
by
马乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.调整地图布局文件,符合UI设计
parent
a76b6d9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
130 additions
and
124 deletions
+130
-124
layout_map_box.xml
app/src/main/res/layout/layout_map_box.xml
+130
-124
No files found.
app/src/main/res/layout/layout_map_box.xml
View file @
5c819d33
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<
androidx.constraintlayout.widget.Constraint
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Frame
Layout
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=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/drawable_bg_map_box"
android:background=
"@drawable/drawable_bg_map_box"
android:padding=
"@dimen/dp_3"
tools:context=
".ui.MainActivity"
>
tools:context=
".ui.MainActivity"
>
<androidx.cardview.widget.CardView
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_height=
"match_parent"
app:layout_constraintBottom_toTopOf=
"@id/collectDataText"
app:cardCornerRadius=
"@dimen/dp_12"
>
app:layout_constraintEnd_toEndOf=
"parent"
<androidx.constraintlayout.widget.ConstraintLayout
app:layout_constraintStart_toStartOf=
"parent"
android:layout_width=
"match_parent"
app:layout_constraintTop_toTopOf=
"parent"
>
android:layout_height=
"match_parent"
>
<androidx.constraintlayout.widget.ConstraintLayout
<com.mapbox.maps.MapView
android:layout_width=
"match_parent"
android:id=
"@+id/mapView"
android:layout_height=
"0dp"
android:layout_width=
"0dp"
app:layout_constraintBottom_toTopOf=
"@id/collectDataText"
android:layout_height=
"0dp"
app:layout_constraintEnd_toEndOf=
"parent"
android:layout_margin=
"@dimen/dp_3"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
app:layout_constraintEnd_toEndOf=
"parent"
<com.mapbox.maps.MapView
app:layout_constraintStart_toStartOf=
"parent"
android:id=
"@+id/mapView"
app:layout_constraintTop_toTopOf=
"parent"
android:layout_width=
"0dp"
app:mapbox_resourcesAccessToken=
"@string/map_box_public_key"
android:layout_height=
"0dp"
app:mapbox_scaleBarBorderWidth=
"0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:mapbox_scaleBarHeight=
"5dp"
app:layout_constraintEnd_toEndOf=
"parent"
app:mapbox_scaleBarGravity=
"bottom|right"
app:layout_constraintStart_toStartOf=
"parent"
app:mapbox_scaleBarIsMetricUnits=
"true"
app:layout_constraintTop_toTopOf=
"parent"
app:mapbox_scaleBarMarginBottom=
"38dp"
app:mapbox_resourcesAccessToken=
"@string/map_box_public_key"
app:mapbox_scaleBarMarginRight=
"0dp"
app:mapbox_scaleBarBorderWidth=
"0dp"
app:mapbox_scaleBarPrimaryColor=
"@color/black"
app:mapbox_scaleBarHeight=
"5dp"
app:mapbox_scaleBarSecondaryColor=
"@android:color/transparent"
app:mapbox_scaleBarGravity=
"bottom|right"
app:mapbox_scaleBarShowTextBorder=
"false"
app:mapbox_scaleBarIsMetricUnits=
"true"
app:mapbox_scaleBarTextBarMargin=
"10dp"
app:mapbox_scaleBarMarginBottom=
"38dp"
app:mapbox_scaleBarTextColor=
"@android:color/black"
app:mapbox_scaleBarMarginRight=
"0dp"
app:mapbox_scaleBarTextSize=
"10dp"
/>
app:mapbox_scaleBarPrimaryColor=
"@color/black"
app:mapbox_scaleBarSecondaryColor=
"@android:color/transparent"
<androidx.appcompat.widget.AppCompatImageView
app:mapbox_scaleBarShowTextBorder=
"false"
android:id=
"@+id/sos"
app:mapbox_scaleBarTextBarMargin=
"10dp"
style=
"@style/MapBoxButtonStyle"
app:mapbox_scaleBarTextColor=
"@android:color/black"
android:layout_width=
"wrap_content"
app:mapbox_scaleBarTextSize=
"10dp"
/>
android:layout_height=
"wrap_content"
android:layout_marginStart=
"30dp"
android:layout_marginTop=
"30dp"
android:contentDescription=
"@string/sos"
android:src=
"@drawable/background_sos_btn"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/emergency
"
android:id=
"@+id/sos
"
style=
"@style/MapBoxButtonStyle"
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=
"25
dp"
android:layout_marginStart=
"30
dp"
android:layout_marginBottom=
"25
dp"
android:layout_marginTop=
"30
dp"
android:contentDescription=
"@string/emergency
"
android:contentDescription=
"@string/sos
"
android:src=
"@mipmap/icon_driving_state_emergency
"
android:src=
"@drawable/background_sos_btn
"
app:layout_constraintBottom_toBottom
Of=
"parent"
app:layout_constraintStart_toStart
Of=
"parent"
app:layout_constraintStart_toStart
Of=
"parent"
/>
app:layout_constraintTop_toTop
Of=
"parent"
/>
<androidx.appcompat.widget.LinearLayoutCompat
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/zoomLayout"
android:id=
"@+id/emergency"
android:layout_width=
"wrap_content"
style=
"@style/MapBoxButtonStyle"
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_marginTop=
"24dp"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"28dp"
android:layout_marginStart=
"25dp"
android:orientation=
"vertical"
android:layout_marginBottom=
"25dp"
app:layout_constraintEnd_toEndOf=
"parent"
android:contentDescription=
"@string/emergency"
app:layout_constraintTop_toTopOf=
"parent"
>
android:src=
"@mipmap/icon_driving_state_emergency"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/zoomOut"
android:id=
"@+id/zoomLayout"
style=
"@style/MapBoxButtonStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"0dp"
android:layout_marginTop=
"24dp"
android:layout_weight=
"1"
android:layout_marginEnd=
"28dp"
android:contentDescription=
"@string/zoom_out"
android:orientation=
"vertical"
android:src=
"@drawable/background_zoom_out"
/>
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
<View
<androidx.appcompat.widget.AppCompatImageView
android:layout_width=
"match_parent"
android:id=
"@+id/zoomOut"
android:layout_height=
"1dp"
style=
"@style/MapBoxButtonStyle"
android:layout_marginStart=
"12dp"
android:layout_width=
"wrap_content"
android:layout_marginEnd=
"12dp"
android:layout_height=
"0dp"
android:background=
"@color/color_ffcacaca"
/>
android:layout_weight=
"1"
android:contentDescription=
"@string/zoom_out"
android:src=
"@drawable/background_zoom_out"
/>
<androidx.appcompat.widget.AppCompatImageView
<View
android:id=
"@+id/zoomIn"
android:layout_width=
"match_parent"
style=
"@style/MapBoxButtonStyle"
android:layout_height=
"1dp"
android:layout_width=
"wrap_content"
android:layout_marginStart=
"12dp"
android:layout_height=
"0dp"
android:layout_marginEnd=
"12dp"
android:layout_weight=
"1"
android:background=
"@color/color_ffcacaca"
/>
android:contentDescription=
"@string/zoom_in"
android:src=
"@drawable/background_zoom_in"
/>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/locationTruck"
android:id=
"@+id/zoomIn"
style=
"@style/MapBoxButtonStyle"
style=
"@style/MapBoxButtonStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"0dp"
android:contentDescription=
"@string/location_truck"
android:layout_weight=
"1"
android:src=
"@drawable/background_location_truck"
android:contentDescription=
"@string/zoom_in"
app:layout_constraintBottom_toBottomOf=
"parent"
android:src=
"@drawable/background_zoom_in"
/>
app:layout_constraintEnd_toEndOf=
"@id/zoomLayout"
</androidx.appcompat.widget.LinearLayoutCompat>
app:layout_constraintStart_toStartOf=
"@id/zoomLayout"
app:layout_constraintTop_toTopOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatImageView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/toggleSafetyRange"
android:id=
"@+id/locationTruck"
style=
"@style/MapBoxButtonStyle"
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=
"34dp"
android:contentDescription=
"@string/location_truck"
android:contentDescription=
"@string/toggle_safety_range"
android:src=
"@drawable/background_location_truck"
android:src=
"@mipmap/icon_map_enable_safety_range_light"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@id/zoomLayout"
app:layout_constraintEnd_toEndOf=
"@id/zoomLayout"
app:layout_constraintStart_toStartOf=
"@id/zoomLayout"
app:layout_constraintStart_toStartOf=
"@id/zoomLayout"
app:layout_constraintTop_toBottomOf=
"@id/locationTruck"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatTextView
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/collectDataText"
android:id=
"@+id/toggleSafetyRange"
android:layout_width=
"0dp"
style=
"@style/MapBoxButtonStyle"
android:layout_height=
"@dimen/dp_56"
android:layout_width=
"wrap_content"
android:layout_marginStart=
"@dimen/dp_3"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"@dimen/dp_3"
android:layout_marginTop=
"34dp"
android:gravity=
"center"
android:contentDescription=
"@string/toggle_safety_range"
android:text=
"@string/collect_data_text"
android:src=
"@mipmap/icon_map_enable_safety_range_light"
android:visibility=
"gone"
app:layout_constraintEnd_toEndOf=
"@id/zoomLayout"
android:textSize=
"@dimen/sp_20"
app:layout_constraintStart_toStartOf=
"@id/zoomLayout"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/locationTruck"
/>
app:layout_constraintEnd_toEndOf=
"parent"
</androidx.constraintlayout.widget.ConstraintLayout>
app:layout_constraintStart_toStartOf=
"parent"
/>
<androidx.appcompat.widget.AppCompatTextView
</androidx.constraintlayout.widget.ConstraintLayout>
android:id=
"@+id/collectDataText"
\ No newline at end of file
android:layout_width=
"0dp"
android:layout_height=
"@dimen/dp_56"
android:layout_marginStart=
"@dimen/dp_3"
android:layout_marginEnd=
"@dimen/dp_3"
android:gravity=
"center"
android:text=
"@string/collect_data_text"
android:visibility=
"gone"
android:textSize=
"@dimen/sp_20"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</FrameLayout>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment