From 2fb397e4a31d14880ed2524f898ae67a0d664c06 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期二, 17 十二月 2024 11:24:29 +0800
Subject: [PATCH] 1.在地图中心显示中心点。 2.优化地图覆盖物显示,使显示的图标正对坐标。 3.优化地图覆盖物文字居中显示。

---
 app/src/main/res/layout/activity_main.xml |  140 ++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 116 insertions(+), 24 deletions(-)

diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 4f2f815..0bbf29c 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
@@ -12,35 +11,128 @@
         android:id="@+id/viewPager"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:layout_above="@id/tabLayout" />
+        android:layout_above="@id/bottom_navigation" />
 
 
-    <com.google.android.material.tabs.TabLayout
-        android:id="@+id/tabLayout"
+    <LinearLayout
+        android:id="@+id/bottom_navigation"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
+        android:layout_height="70dp"
         android:layout_alignParentBottom="true"
-        android:background="?attr/colorPrimary"
-        app:tabGravity="fill"
-        app:tabIndicatorColor="#FFC107"
-        app:tabMode="fixed"
-        app:tabSelectedTextColor="#FFC107"
-        app:tabTextColor="#000000">
+        android:layout_marginTop="-20dp"
+        android:background="#00ffffff"
+        android:gravity="bottom"
+        android:orientation="horizontal">
 
-<!--        <com.google.android.material.tabs.TabItem-->
-<!--            android:layout_width="match_parent"-->
-<!--            android:layout_height="match_parent"-->
-<!--            android:text="棣栭〉" />-->
+        <LinearLayout
+            android:id="@+id/orderLL"
+            android:layout_width="0dp"
+            android:layout_height="50dp"
+            android:layout_weight="1"
+            android:background="@color/bottom_color"
+            android:gravity="center"
+            android:orientation="vertical">
 
-<!--        <com.google.android.material.tabs.TabItem-->
-<!--            android:layout_width="match_parent"-->
-<!--            android:layout_height="match_parent"-->
-<!--            android:text="鍦板浘" />-->
+            <ImageView
+                android:id="@+id/orderImg"
+                android:layout_width="wrap_content"
+                android:layout_height="25dp"
+                android:layout_marginTop="8dp"
+                android:src="@drawable/bottom_order_black" />
 
-<!--        <com.google.android.material.tabs.TabItem-->
-<!--            android:layout_width="match_parent"-->
-<!--            android:layout_height="match_parent"-->
-<!--            android:text="鎴戠殑" />-->
-    </com.google.android.material.tabs.TabLayout>
+            <TextView
+                android:id="@+id/orderText"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginBottom="3dp"
+                android:text="宸ュ崟"
+                android:textSize="12sp" />
+
+        </LinearLayout>
+
+        <FrameLayout
+            android:id="@+id/mapLL"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:gravity="bottom"
+            android:orientation="vertical">
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="50dp"
+                android:layout_gravity="bottom"
+                android:background="@color/bottom_color"
+                android:orientation="vertical" />
+
+            <LinearLayout
+                android:layout_width="80dp"
+                android:layout_height="70dp"
+                android:layout_gravity="center"
+                android:background="@drawable/bottom_circle_bg"
+                android:gravity="center"
+                android:orientation="vertical">
+
+                <ImageView
+                    android:id="@+id/mapImg"
+                    android:layout_width="40dp"
+                    android:layout_height="40dp"
+                    android:layout_marginTop="8dp"
+                    android:src="@drawable/bottom_map_white" />
+
+                <TextView
+                    android:id="@+id/mapText"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="鍦板浘"
+                    android:textColor="@color/white"
+                    android:textSize="15sp" />
+
+            </LinearLayout>
+
+        </FrameLayout>
+
+        <LinearLayout
+            android:id="@+id/myLL"
+            android:layout_width="0dp"
+            android:layout_height="50dp"
+            android:layout_weight="1"
+            android:background="@color/bottom_color"
+            android:gravity="center"
+            android:orientation="vertical">
+
+            <ImageView
+                android:id="@+id/myImg"
+                android:layout_width="wrap_content"
+                android:layout_height="25dp"
+                android:layout_marginTop="8dp"
+                android:src="@drawable/bottom_my_black" />
+
+            <TextView
+                android:id="@+id/myText"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginBottom="3dp"
+                android:text="鎴戠殑"
+                android:textSize="12sp" />
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+
+    <!--    &lt;!&ndash; BottomNavigationView 鐢ㄤ簬搴曢儴瀵艰埅 &ndash;&gt;-->
+    <!--    <com.google.android.material.bottomnavigation.BottomNavigationView-->
+    <!--        android:id="@+id/bottom_navigation"-->
+    <!--        android:layout_width="match_parent"-->
+    <!--        android:layout_height="wrap_content"-->
+    <!--        android:layout_alignParentBottom="true"-->
+    <!--        android:background="@color/bottom_color"-->
+    <!--        app:menu="@menu/main_bottom_nav_menu"-->
+    <!--        app:itemIconTint="@color/bottom_selector_nav_item"-->
+    <!--        app:itemTextColor="@color/bottom_selector_nav_item"-->
+
+    <!--        />-->
+
 
 </RelativeLayout>
\ No newline at end of file

--
Gitblit v1.8.0