Jelajahi Sumber

1.添加bugly更新

shihuiyun 2 tahun lalu
induk
melakukan
6cecef4718
82 mengubah file dengan 83 tambahan dan 5472 penghapusan
  1. 0 1
      app/build.gradle
  2. 22 13
      app/src/main/java/com/zswc/creativity/adapter/MsgAdapter.kt
  3. 2 3
      app/src/main/java/com/zswc/creativity/model/MsgList.kt
  4. 22 10
      app/src/main/java/com/zswc/creativity/utils/net/ApiService.kt
  5. 6 0
      app/src/main/java/com/zswc/creativity/vmodel/HomeFirstVModel.kt
  6. 1 1
      app/src/main/java/com/zswc/creativity/vmodel/MsgVModel.kt
  7. 1 1
      app/src/main/java/com/zswc/creativity/vmodel/MyWalletVModel.kt
  8. 1 0
      app/src/main/res/layout/fragment_home_first.xml
  9. 27 60
      app/src/main/res/layout/item_msg.xml
  10. 1 1
      app/src/main/res/values/strings.xml
  11. 0 2
      gaode/.gitignore
  12. 0 72
      gaode/build.gradle
  13. TEMPAT SAMPAH
      gaode/libs/locationsdk-1.0.0.aar
  14. 0 56
      gaode/proguard-rules.pro
  15. 0 72
      gaode/src/main/AndroidManifest.xml
  16. 0 72
      gaode/src/main/debug/AndroidManifest.xml
  17. 0 471
      gaode/src/main/java/com/quansu/gaode/activity/AutoListView.java
  18. 0 782
      gaode/src/main/java/com/quansu/gaode/activity/GaodeActivity.java
  19. 0 606
      gaode/src/main/java/com/quansu/gaode/activity/PolylineActivity.java
  20. 0 354
      gaode/src/main/java/com/quansu/gaode/activity/RouteActivity.java
  21. 0 243
      gaode/src/main/java/com/quansu/gaode/activity/SearchAddressActivity.java
  22. 0 63
      gaode/src/main/java/com/quansu/gaode/adapter/PoiAdapter.java
  23. 0 117
      gaode/src/main/java/com/quansu/gaode/adapter/SearchResultAdapter.java
  24. 0 20
      gaode/src/main/java/com/quansu/gaode/adapter/ViewHolder.java
  25. 0 92
      gaode/src/main/java/com/quansu/gaode/bean/PoiBean.java
  26. 0 172
      gaode/src/main/java/com/quansu/gaode/componnent/CpGaode.java
  27. 0 57
      gaode/src/main/java/com/quansu/gaode/utils/AMapServicesUtil.java
  28. 0 151
      gaode/src/main/java/com/quansu/gaode/utils/AMapUtil.java
  29. 0 135
      gaode/src/main/java/com/quansu/gaode/utils/CurrentLocationUtils.java
  30. 0 146
      gaode/src/main/java/com/quansu/gaode/utils/LocationUtils.java
  31. 0 217
      gaode/src/main/java/com/quansu/gaode/utils/RouteOverlay.java
  32. 0 114
      gaode/src/main/java/com/quansu/gaode/utils/WalkRouteOverlay.java
  33. 0 237
      gaode/src/main/java/com/quansu/gaode/view/SegmentedGroup.java
  34. TEMPAT SAMPAH
      gaode/src/main/jniLibs/armeabi-v7a/libAMapSDK_MAP_v7_1_0.so
  35. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/amap_bus.webp
  36. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/amap_car.webp
  37. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/amap_end.webp
  38. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/amap_enter.webp
  39. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/amap_man.webp
  40. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/amap_out.webp
  41. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/amap_start.webp
  42. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/end.webp
  43. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/gaode_delete.webp
  44. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/gaode_serch.webp
  45. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/ic_vehicle.webp
  46. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/icon_affirm_selected.webp
  47. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/purple_pin.webp
  48. TEMPAT SAMPAH
      gaode/src/main/res/drawable-xxhdpi/start.webp
  49. 0 6
      gaode/src/main/res/drawable/bg_search_shape_44.xml
  50. 0 6
      gaode/src/main/res/drawable/button_text_color.xml
  51. 0 30
      gaode/src/main/res/drawable/custom_progress_bar.xml
  52. 0 16
      gaode/src/main/res/drawable/gaode_stock_gary.xml
  53. 0 13
      gaode/src/main/res/drawable/gaode_stock_white.xml
  54. 0 9
      gaode/src/main/res/drawable/ic_arrow_back_black_24dp.xml
  55. 0 10
      gaode/src/main/res/drawable/radio_checked.xml
  56. 0 10
      gaode/src/main/res/drawable/radio_unchecked.xml
  57. 0 267
      gaode/src/main/res/layout/activity_gaode.xml
  58. 0 160
      gaode/src/main/res/layout/activity_search_address.xml
  59. 0 38
      gaode/src/main/res/layout/autolistview_footer.xml
  60. 0 12
      gaode/src/main/res/layout/gaode_end_marker.xml
  61. 0 12
      gaode/src/main/res/layout/gaode_item_marker.xml
  62. 0 12
      gaode/src/main/res/layout/gaode_start_marker.xml
  63. 0 39
      gaode/src/main/res/layout/item_select_address.xml
  64. 0 202
      gaode/src/main/res/layout/map_layout.xml
  65. 0 122
      gaode/src/main/res/layout/map_route.xml
  66. 0 49
      gaode/src/main/res/layout/pull_to_refresh_header.xml
  67. 0 41
      gaode/src/main/res/layout/view_holder_result.xml
  68. TEMPAT SAMPAH
      gaode/src/main/res/mipmap-hdpi/loading_0.png
  69. TEMPAT SAMPAH
      gaode/src/main/res/mipmap-hdpi/loading_1.png
  70. TEMPAT SAMPAH
      gaode/src/main/res/mipmap-hdpi/loading_2.png
  71. TEMPAT SAMPAH
      gaode/src/main/res/mipmap-hdpi/loading_3.png
  72. TEMPAT SAMPAH
      gaode/src/main/res/mipmap-hdpi/loading_4.png
  73. TEMPAT SAMPAH
      gaode/src/main/res/mipmap-hdpi/loading_5.png
  74. TEMPAT SAMPAH
      gaode/src/main/res/mipmap-hdpi/loading_6.png
  75. TEMPAT SAMPAH
      gaode/src/main/res/mipmap-hdpi/loading_7.png
  76. TEMPAT SAMPAH
      gaode/src/main/res/mipmap-hdpi/poi_marker_1.png
  77. TEMPAT SAMPAH
      gaode/src/main/res/mipmap-hdpi/point4.png
  78. TEMPAT SAMPAH
      gaode/src/main/res/mipmap-hdpi/pull_to_refresh_arrow.png
  79. 0 7
      gaode/src/main/res/values/colors.xml
  80. 0 3
      gaode/src/main/res/values/dimens.xml
  81. 0 13
      gaode/src/main/res/values/strings.xml
  82. 0 54
      gaode/src/main/res/values/styles.xml

+ 0 - 1
app/build.gradle

@@ -125,7 +125,6 @@ dependencies {
 
   // addComponent 'umeng'
 //    addComponent 'jpush'
-//    addComponent 'gaode'
 //   addComponent 'lookimg'
 
     //首页导航图

+ 22 - 13
app/src/main/java/com/zswc/creativity/adapter/MsgAdapter.kt

@@ -1,7 +1,11 @@
 package com.zswc.creativity.adapter
 
+import android.graphics.Color
 import android.os.Bundle
+import android.text.Spannable
+import android.text.SpannableStringBuilder
 import android.text.TextUtils
+import android.text.style.ForegroundColorSpan
 import android.view.View
 import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
 import com.qmuiteam.qmui.kotlin.onClick
@@ -19,21 +23,26 @@ class MsgAdapter(var vm: MsgVModel) : BAdapter<MsgList, BaseDataBindingHolder<It
     override fun convert(holder: BaseDataBindingHolder<ItemMsgBinding>, item: MsgList) {
         holder.dataBinding?.vm=vm
         holder.dataBinding?.item = item
-        holder.dataBinding?.ll!!.onClick {
-            item.is_read=1
-            holder.dataBinding?.tvMsg!!.visibility= View.GONE
-            if(!TextUtils.isEmpty(item.android_url)){
 
-                vm.isRead(item.data_id)
-                VerifyUtils.isAndroidUrl(item.android_url,context,false)
+        var title=item.title+"·"
+        var ss=title.split(".")
+        var spannableString= SpannableStringBuilder(title)
+        spannableString.setSpan(ForegroundColorSpan(Color.BLUE),ss.size-2, ss.size-1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
+        holder.dataBinding?.tvTitle?.text = spannableString
 
-            }else {
-                UiSwitch.bundle(context, ArticleDetailActivity::class.java, Bundle().apply {
-                    putInt("type", -1)
-                    putString("id", item.data_id)
-                })
-            }
 
-        }
+//        if(item.is_read){//已读
+//            holder.dataBinding?.tvTitle?.text=item.title
+//        }else{
+//
+//            var title=item.title+"·"
+//            var ss=title.split(".")
+//            var spannableString= SpannableStringBuilder(title)
+//            spannableString.setSpan(ForegroundColorSpan(Color.BLUE),ss.size-2, ss.size-1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
+//            holder.dataBinding?.tvTitle?.text = spannableString
+//
+//
+//        }
+
     }
 }

+ 2 - 3
app/src/main/java/com/zswc/creativity/model/MsgList.kt

@@ -6,8 +6,7 @@ import com.ysnows.base.inter.IModel
  *Created by shihuiyun
  *on 2020/9/25
  */
-data class MsgList(var data_id:String,var uid:String,var msg_id:String,
-                   var is_read:Int,var create_time:String,var update_time:String,
-                   var title:String,var content:String,var android_url:String
+data class MsgList(var id:String,var content:String,var create_at:String,
+                   var is_read:Boolean,var title:String
 ): IModel {
 }

+ 22 - 10
app/src/main/java/com/zswc/creativity/utils/net/ApiService.kt

@@ -72,6 +72,28 @@ interface ApiService {
     suspend fun articleInfo(): Resp<ArticleInfo>
 
 
+    /**
+     * 消息-已读
+     * @return
+     */
+    @GET("api/msg/msgRead")
+    suspend fun msgRead(@Query("arr") arr: String?): Resp<Any>
+
+    /**
+     * 消息-分页
+     * @return
+     */
+    @FormUrlEncoded
+    @POST("User_center/messageList")
+    suspend fun msgListPage(
+            @Field("page_num") page_num: Int?,
+            @Field("page") page: Int?
+    ): PageResp<MsgList>
+
+
+
+
+
 
 
 //    @GET("api/msg/msgList")
@@ -747,9 +769,6 @@ interface ApiService {
     @GET("api/msg/msgList")
     suspend fun msgList(): Resp<List<MsgList>>
 
-    @GET("api/msg/msgList")
-    suspend fun msgListPage(@Query("p") p: Int): PageResp<MsgList>
-
 
     /**
      * 修改资料
@@ -876,13 +895,6 @@ interface ApiService {
     suspend fun wxBind(@Query("code") code: String?): Resp<Bind>
 
 
-    /**
-     * 消息-已读
-     * @return
-     */
-    @GET("api/msg/msgRead")
-    suspend fun msgRead(@Query("arr") arr: String?): Resp<Any>
-
 
     /**
      * 应付保费试算

+ 6 - 0
app/src/main/java/com/zswc/creativity/vmodel/HomeFirstVModel.kt

@@ -9,6 +9,7 @@ import com.ysnows.base.base.BRepository
 import com.ysnows.base.base.BViewModel
 import com.ysnows.base.utils.UiSwitch
 import com.zswc.creativity.activity.CertificationActivity
+import com.zswc.creativity.activity.MsgActivity
 import kotlinx.coroutines.launch
 
 /**
@@ -46,6 +47,11 @@ open class HomeFirstVModel(application: Application) : BViewModel<BRepository>(a
 
     }
 
+    fun toMsg(){
+        UiSwitch.single(repository().context, MsgActivity::class.java)
+
+    }
+
     fun  toGetBanner(){
         viewModelScope.launch {
             val it = repository().lreq { NetEngine.service.getBanner() }

+ 1 - 1
app/src/main/java/com/zswc/creativity/vmodel/MsgVModel.kt

@@ -28,7 +28,7 @@ class MsgVModel(application: Application) : BRViewModel<BRRepository>(applicatio
 //    }
 
     override fun apiFunc(): suspend () -> IResp<*> {
-        return { NetEngine.service.msgListPage(repository().page) }
+        return { NetEngine.service.msgListPage(10,repository().page) }
     }
 
 

+ 1 - 1
app/src/main/java/com/zswc/creativity/vmodel/MyWalletVModel.kt

@@ -37,7 +37,7 @@ class MyWalletVModel(application: Application) : BRViewModel<BRRepository>(appli
     }
 
     override fun apiFunc(): suspend () -> IResp<*> {
-        return { NetEngine.service.msgListPage(repository().page) }
+        return { NetEngine.service.msgListPage(10,repository().page) }
     }
 
 

+ 1 - 0
app/src/main/res/layout/fragment_home_first.xml

@@ -92,6 +92,7 @@
                                 android:layout_height="match_parent"
                                 android:ellipsize="marquee"
                                 android:focusable="true"
+                                android:onClick="@{v->vm.toMsg()}"
                                 android:focusableInTouchMode="true"
                                 android:gravity="center_vertical"
                                 android:marqueeRepeatLimit="marquee_forever"

+ 27 - 60
app/src/main/res/layout/item_msg.xml

@@ -20,75 +20,42 @@
     <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
         android:id="@+id/ll"
         android:layout_width="match_parent"
-        android:layout_marginTop="13dp"
+        android:layout_marginTop="12dp"
         android:layout_marginStart="15dp"
         android:layout_marginEnd="15dp"
+        android:orientation="vertical"
         app:qmui_radius="6dp"
+        android:paddingStart="10dp"
+        android:paddingEnd="10dp"
+        android:paddingTop="12dp"
+        android:paddingBottom="@dimen/dp_11"
         app:qmui_borderColor="@color/white"
         app:qmui_backgroundColor="@color/white"
         android:layout_height="wrap_content">
-
-
-        <RelativeLayout
-            android:id="@+id/rl_todo"
+        
+        <TextView
+            android:id="@+id/tv_title"
+            android:hint="4月21日最新公告"
+            android:textSize="15sp"
+            android:textColor="#222222"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal"
-            android:paddingLeft="12dp"
-            android:paddingTop="19dp"
-            android:paddingBottom="17dp"
-            android:paddingRight="15dp" >
-
-            <ImageView
-                android:id="@+id/img_icon"
-                android:layout_width="42dp"
-                android:layout_height="42dp"
-                android:layout_centerVertical="true"
-                android:src="@drawable/ic_msg_one"
-                 />
-            <TextView
-                android:id="@+id/tv_msg"
-                android:layout_width="9dp"
-                android:background="@drawable/bg_chose_red"
-                android:layout_marginStart="33dp"
-                android:visibility="@{item.is_read==0?View.VISIBLE:View.GONE}"
-                android:layout_marginTop="2dp"
-                android:layout_height="9dp"/>
-
-            <LinearLayout
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginStart="@dimen/dp_8"
-                android:layout_toEndOf="@id/img_icon"
-                android:orientation="vertical" >
-
-                <TextView
-                    android:id="@+id/tv_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:ellipsize="end"
-                    android:maxLines="1"
-                    android:text="@{item.title}"
-                    android:textColor="#3E3D3D"
-                    android:textSize="@dimen/sp_15"
-                    tools:text="@string/app_name" />
-
-                <TextView
-                    android:id="@+id/tv_desc"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="9dp"
-                    android:text="@{item.create_time}"
-                    android:textColor="#8B8B8B"
-                    android:textSize="11dp"
-                    tools:text="@string/app_name" />
-
-            </LinearLayout >
-
+            android:layout_height="wrap_content"/>
 
+        <TextView
+            android:text="@{item.content}"
+            android:textSize="12sp"
+            android:layout_marginTop="10dp"
+            android:textColor="#777777"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"/>
 
-        </RelativeLayout >
+        <TextView
+            android:text="@{item.create_at}"
+            android:textSize="10sp"
+            android:layout_marginTop="10dp"
+            android:textColor="#777777"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"/>
 
 
     </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout>

+ 1 - 1
app/src/main/res/values/strings.xml

@@ -420,7 +420,7 @@ Api 已达到使用限制
     <string name="my_account" >我的账户</string >
     <string name="my_collection" >我的收藏</string >
     <string name="connect_service" >联系客服</string >
-    <string name="msg" >消息通知</string >
+    <string name="msg" >消息</string >
     <string name="bill" >账单</string >
     <string name="analysis" >统计</string >
     <string name="available_balance" >可用余额</string >

+ 0 - 2
gaode/.gitignore

@@ -1,2 +0,0 @@
-/build
-*.iml

+ 0 - 72
gaode/build.gradle

@@ -1,72 +0,0 @@
-apply from: rootProject.file('cc-settings.gradle')
-apply from: rootProject.file('common-build.gradle')
-
-android {
-    compileSdkVersion rootProject.target_sdk_version
-
-
-    defaultConfig {
-        minSdkVersion rootProject.min_sdk_version
-        targetSdkVersion rootProject.target_sdk_version
-        versionCode rootProject.application_version_code
-        versionName rootProject.application_version_name
-    }
-    buildTypes {
-        release {
-            minifyEnabled false
-            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
-        }
-    }
-
-    packagingOptions {
-        exclude 'META-INF/XXXX'
-    }
-
-    sourceSets {
-        main {
-            if (!runAsApp) {
-                manifest.srcFile 'src/main/AndroidManifest.xml'
-                //release模式下排除debug文件夹中的所有Java文件
-                java {
-                    exclude 'src/main/debug/**'
-                }
-            } else {
-                manifest.srcFile 'src/main/debug/AndroidManifest.xml'
-//                java.srcDirs = ['src/main/debug']
-            }
-        }
-    }
-
-    compileOptions {
-        sourceCompatibility JavaVersion.VERSION_1_8
-        targetCompatibility JavaVersion.VERSION_1_8
-    }
-
-}
-
-dependencies {
-    implementation fileTree(dir: "libs", include: ["*.jar"])
-
-    implementation 'com.lzy.net:okgo:3.0.4'
-    implementation 'com.alibaba:fastjson:1.2.61'
-    implementation 'org.bouncycastle:bcprov-jdk15on:1.47'
-    // implementation (name:'locationsdk-1.0.0', ext:'aar')
-
-
-   // provided files('libs/locationsdk-1.0.0.aar')
-
-    implementation files('libs/locationsdk-1.0.0.aar')
-
-
-    // compileOnly 'com.amap.api:location:latest.integration' //定位功能
-    implementation 'com.amap.api:search:latest.integration' //搜索功能
-   // implementation 'com.amap.api:3dmap:latest.integration'//3D地图
-    implementation 'com.amap.api:navi-3dmap:latest.integration'//路线规划
-
-    implementation 'com.githang:status-bar-compat:0.7'
-    //2D地图
-   // implementation 'com.amap.api:map2d:latest.integration'
-    implementation project(':base')
-    implementation 'com.alibaba:fastjson:1.2.73'
-
-}

TEMPAT SAMPAH
gaode/libs/locationsdk-1.0.0.aar


+ 0 - 56
gaode/proguard-rules.pro

@@ -1,56 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
-#3D 地图 V5.0.0之前:
--keep   class com.amap.api.maps.**{*;}
--keep   class com.autonavi.amap.mapcore.*{*;}
--keep   class com.amap.api.trace.**{*;}
-
-#    3D 地图 V5.0.0之后:
--keep   class com.amap.api.maps.**{*;}
--keep   class com.autonavi.**{*;}
--keep   class com.amap.api.trace.**{*;}
-
-#    定位
--keep class com.amap.api.location.**{*;}
--keep class com.amap.api.fence.**{*;}
--keep class com.loc.**{*;}
--keep class com.autonavi.aps.amapapi.model.**{*;}
-
-#    搜索
--keep   class com.amap.api.services.**{*;}
-
-#    2D地图
--keep class com.amap.api.maps2d.**{*;}
--keep class com.amap.api.mapcore2d.**{*;}
-
-#    导航
--keep class com.amap.api.navi.**{*;}
--keep class com.autonavi.**{*;}
-#导航 V7.3.0以前:
--keep class com.amap.api.navi.**{*;}
--keep class com.alibaba.idst.nls.** {*;}
--keep class com.nlspeech.nlscodec.** {*;}
--keep class com.google.**{*;}
-#导航 V7.3.0及以后:
--keep class com.amap.api.navi.**{*;}
--keep class com.alibaba.mit.alitts.*{*;}
--keep class com.google.**{*;}

+ 0 - 72
gaode/src/main/AndroidManifest.xml

@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    package="com.quansu.gaode">
-
-    <!-- Normal Permissions 不需要运行时注册 -->
-    <!-- 获取运营商信息,用于支持提供运营商信息相关的接口 -->
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
-    <!-- 用于访问wifi网络信息,wifi信息会用于进行网络定位 -->
-    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
-    <!-- 这个权限用于获取wifi的获取权限,wifi信息会用来进行网络定位 -->
-    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
-    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION"/>
-
-    <!-- 请求网络 -->
-    <uses-permission android:name="android.permission.INTERNET"/>
-
-    <!-- 不是SDK需要的权限,是示例中的后台唤醒定位需要的权限 -->
-    <uses-permission android:name="android.permission.WAKE_LOCK"/>
-
-    <!-- 需要运行时注册的权限 -->
-    <!-- 用于进行网络定位 -->
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
-    <!-- 用于访问GPS定位 -->
-    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
-    <!-- 用于提高GPS定位速度 -->
-    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
-    <!-- 写入扩展存储,向扩展卡写入数据,用于写入缓存定位数据 -->
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
-    <!-- 读取缓存数据 -->
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
-
-    <!-- 用于读取手机当前的状态 -->
-    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
-
-    <!-- 更改设置 -->
-    <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
-
-    <!--如果设置了target >= 28 如果需要启动后台定位则必须声明这个权限-->
-    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
-    <!--如果您的应用需要后台定位权限,且有可能运行在Android Q设备上,并且设置了target>28,必须增加这个权限声明-->
-    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
-
-    <application
-        android:allowBackup="true"
-        android:label="@string/app_name"
-        android:supportsRtl="true"
-        android:largeHeap="true"
-        android:exported="false"
-        >
-        <!-- 设置key -->
-        <meta-data
-            android:name="com.amap.api.v2.apikey"
-            android:value="cc03c0f78fb9ff8f5bd191a06ebbf422"/>
-
-        <!-- 定位需要的服务 适配Android Q需要加上android:foregroundServiceType="location"-->
-        <service
-            android:name="com.amap.api.location.APSService" />
-
-
-        <activity android:name=".activity.GaodeActivity" >
-
-        </activity >
-        <activity android:name=".activity.SearchAddressActivity"></activity>
-        <activity android:name=".activity.RouteActivity"/>
-        <activity android:name=".activity.PolylineActivity"/>
-
-
-
-    </application>
-
-</manifest>

+ 0 - 72
gaode/src/main/debug/AndroidManifest.xml

@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest package="com.quansu.gaode"
-          xmlns:android="http://schemas.android.com/apk/res/android"
-          xmlns:tools="http://schemas.android.com/tools" >
-    <!-- Normal Permissions 不需要运行时注册 -->
-    <!-- 获取运营商信息,用于支持提供运营商信息相关的接口 -->
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
-    <!-- 用于访问wifi网络信息,wifi信息会用于进行网络定位 -->
-    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
-    <!-- 这个权限用于获取wifi的获取权限,wifi信息会用来进行网络定位 -->
-    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
-    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION"/>
-
-    <!-- 请求网络 -->
-    <uses-permission android:name="android.permission.INTERNET"/>
-
-    <!-- 不是SDK需要的权限,是示例中的后台唤醒定位需要的权限 -->
-    <uses-permission android:name="android.permission.WAKE_LOCK"/>
-
-    <!-- 需要运行时注册的权限 -->
-    <!-- 用于进行网络定位 -->
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
-    <!-- 用于访问GPS定位 -->
-    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
-    <!-- 用于提高GPS定位速度 -->
-    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
-    <!-- 写入扩展存储,向扩展卡写入数据,用于写入缓存定位数据 -->
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
-    <!-- 读取缓存数据 -->
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
-
-    <!-- 用于读取手机当前的状态 -->
-    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
-
-    <!-- 更改设置 -->
-    <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
-
-    <!--如果设置了target >= 28 如果需要启动后台定位则必须声明这个权限-->
-    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
-    <!--如果您的应用需要后台定位权限,且有可能运行在Android Q设备上,并且设置了target>28,必须增加这个权限声明-->
-    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
-
-
-    <application
-        android:allowBackup="true"
-        android:label="@string/app_name"
-        android:supportsRtl="true"
-        android:largeHeap="true" >
-        <!-- 设置key -->
-        <meta-data
-            android:name="com.amap.api.v2.apikey"
-            android:value="880c8098488a8cd9c66310e215aca2ea"/>
-
-        <!-- 定位需要的服务 适配Android Q需要加上android:foregroundServiceType="location"-->
-        <service
-            android:name="com.amap.api.location.APSService" />
-
-
-
-        <activity android:name=".activity.GaodeActivity" >
-<!--            <intent-filter >-->
-<!--                <action android:name="android.intent.action.MAIN" />-->
-<!--                <category android:name="android.intent.category.LAUNCHER" />-->
-<!--            </intent-filter >-->
-        </activity >
-        <activity android:name=".activity.SearchAddressActivity"></activity>
-
-
-
-    </application >
-
-</manifest >

+ 0 - 471
gaode/src/main/java/com/quansu/gaode/activity/AutoListView.java

@@ -1,471 +0,0 @@
-package com.zswc.gaode.activity;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.animation.LinearInterpolator;
-import android.view.animation.RotateAnimation;
-import android.widget.AbsListView;
-import android.widget.AbsListView.OnScrollListener;
-import android.widget.ImageView;
-import android.widget.ListView;
-import android.widget.ProgressBar;
-import android.widget.TextView;
-
-import com.zswc.gaode.R;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-
-public class AutoListView extends ListView implements OnScrollListener {
-	// 区分当前操作是刷新还是加载?
-	public static final int REFRESH = 0;
-	public static final int LOAD = 1;
-	// 区分PULL和RELEASE的距离的大小
-	private static final int SPACE = 20;
-	// 定义header的四种状态和当前状载?
-	private static final int NONE = 0;
-	private static final int PULL = 1;
-	private static final int RELEASE = 2;
-	private static final int REFRESHING = 3;
-	private final String TAG = "AutoListView";
-	/**
-	 * 这个方法是根据结果的大小来决定footer显示的�??
-	 * <p>
-	 * 这里假定每次请求的条数为10。如果请求到�?10条�?�则认为还有数据。如过结果不�?10条,则认为数据�
-	 * ��经全部加载,这时footer显示已经全部加载
-	 * </p>
-	 *
-	 * @param resultSize
-	 */
-	int mResultSize;
-	private int state;
-	private LayoutInflater inflater;
-	private View header;
-	private View footer;
-	private TextView tip;
-	private TextView lastUpdate;
-	private ImageView arrow;
-	private ProgressBar refreshing;
-	private TextView noData;
-	private TextView loadFull;
-	private TextView more;
-	private ProgressBar loading;
-	private RotateAnimation animation;
-	private RotateAnimation reverseAnimation;
-	private int startY;
-	private int firstVisibleItem;
-	private int scrollState;
-	private int headerContentInitialHeight;
-	private int headerContentHeight;
-	// 只有在listview第一个item显示的时候(listview滑到了顶部)才进行下拉刷新,
-	// 否则此时的下拉只是滑动listview
-	private boolean isRecorded;
-	private boolean isLoading;// 判断是否正在加载
-	private boolean loadEnable = true;// �?启或者关闭加载更多功�?
-	private boolean isLoadFull;
-	private int pageSize = 10;
-	private int currentSize = 0;
-	private OnRefreshListener onRefreshListener;
-	private OnLoadListener onLoadListener;
-	private int mLastMotionY;
-
-	public AutoListView(Context context) {
-		super(context);
-		initView(context);
-	}
-
-	public AutoListView(Context context, AttributeSet attrs) {
-		super(context, attrs);
-		initView(context);
-	}
-
-	public AutoListView(Context context, AttributeSet attrs, int defStyle) {
-		super(context, attrs, defStyle);
-		initView(context);
-	}
-
-	public static String getCurrentTime(String format) {
-		Date date = new Date();
-		SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.getDefault());
-		String currentTime = sdf.format(date);
-		return currentTime;
-	}
-
-	public static String getCurrentTime() {
-		return getCurrentTime("yyyy-MM-dd  HH:mm:ss");
-	}
-
-	// 下拉刷新监听
-	public void setOnRefreshListener(OnRefreshListener onRefreshListener) {
-		this.onRefreshListener = onRefreshListener;
-	}
-
-	// 加载更多监听
-	public void setOnLoadListener(OnLoadListener onLoadListener) {
-		this.loadEnable = true;
-		this.onLoadListener = onLoadListener;
-	}
-
-	public boolean isLoadEnable() {
-		return loadEnable;
-	}
-
-	// 这里的开启或者关闭加载更多,并不支持动�?�调�?
-	public void setLoadEnable(boolean loadEnable) {
-		this.loadEnable = loadEnable;
-		this.removeFooterView(footer);
-	}
-
-	public int getPageSize8(){
-		this.pageSize=8;
-		return pageSize;
-	}
-
-	public int getPageSize() {
-		return pageSize;
-	}
-
-	public void setPageSize(int pageSize) {
-		this.pageSize = pageSize;
-	}
-
-	public int getCurrentSize() {
-		return currentSize;
-	}
-
-	public void setCurrentSize(int currentSize) {
-		this.currentSize = currentSize;
-	}
-
-	// 初始化组�?
-	private void initView(Context context) {
-
-		// 设置箭头特效
-		animation = new RotateAnimation(0, -180,
-				RotateAnimation.RELATIVE_TO_SELF, 0.5f,
-				RotateAnimation.RELATIVE_TO_SELF, 0.5f);
-		animation.setInterpolator(new LinearInterpolator());
-		animation.setDuration(100);
-		animation.setFillAfter(true);
-
-		reverseAnimation = new RotateAnimation(-180, 0,
-				RotateAnimation.RELATIVE_TO_SELF, 0.5f,
-				RotateAnimation.RELATIVE_TO_SELF, 0.5f);
-		reverseAnimation.setInterpolator(new LinearInterpolator());
-		reverseAnimation.setDuration(100);
-		reverseAnimation.setFillAfter(true);
-
-		inflater = LayoutInflater.from(context);
-		footer = inflater.inflate(R.layout.autolistview_footer, null);
-		loadFull = (TextView) footer.findViewById(R.id.loadFull);
-		noData = (TextView) footer.findViewById(R.id.noData);
-		more = (TextView) footer.findViewById(R.id.more);
-		loading = (ProgressBar) footer.findViewById(R.id.loading);
-
-		header = inflater.inflate(R.layout.pull_to_refresh_header, null);
-		arrow = (ImageView) header.findViewById(R.id.arrow);
-		tip = (TextView) header.findViewById(R.id.tip);
-		lastUpdate = (TextView) header.findViewById(R.id.lastUpdate);
-		refreshing = (ProgressBar) header.findViewById(R.id.refreshing);
-
-		// 为listview添加头部和尾部,并进行初始化
-		headerContentInitialHeight = header.getPaddingTop();
-		measureView(header);
-		headerContentHeight = header.getMeasuredHeight();
-		topPadding(-headerContentHeight);
-		this.addHeaderView(header, null, false);
-		this.addFooterView(footer, null, false);
-		this.setOnScrollListener(this);
-		footer.setVisibility(View.GONE);
-	}
-
-	public void onRefresh() {
-		currentSize = 0;
-		if (onRefreshListener != null) {
-			onRefreshListener.onRefresh();
-		}
-	}
-
-	public void onLoad() {
-		if (onLoadListener != null) {
-			onLoadListener.onLoad();
-		}
-	}
-
-	public void onRefreshComplete(String updateTime) {
-		lastUpdate.setText(this.getContext().getString(R.string.lastUpdateTime,
-				getCurrentTime()));
-		state = NONE;
-		refreshHeaderViewByState();
-	}
-
-	// 用于下拉刷新结束后的回调
-	public void onRefreshComplete() {
-		String currentTime = getCurrentTime();
-		onRefreshComplete(currentTime);
-	}
-
-	// 用于加载更多结束后的回调
-	public void onLoadComplete() {
-		isLoading = false;
-	}
-
-	@Override
-	public void onScroll(AbsListView view, int firstVisibleItem,
-						 int visibleItemCount, int totalItemCount) {
-		this.firstVisibleItem = firstVisibleItem;
-	}
-
-	@Override
-	public void onScrollStateChanged(AbsListView view, int scrollState) {
-		this.scrollState = scrollState;
-		ifNeedLoad(view, scrollState);
-	}
-
-	// 根据listview滑动的状态判断是否需要加载更�?
-	private void ifNeedLoad(AbsListView view, int scrollState) {
-		if (!loadEnable) {
-			return;
-		}
-//		if(isLoadFull&&view.getLastVisiblePosition() == view
-//				.getPositionForView(footer) &&!isLoading){
-//			ToastMgr.showShort(getContext(), "暂无更多内容");
-//			isLoading=true;
-//		}
-		try {
-			if (scrollState == OnScrollListener.SCROLL_STATE_IDLE
-					&& !isLoading
-					&& view.getLastVisiblePosition() == view
-							.getPositionForView(footer) && !isLoadFull) {
-//				LogMgr.d("loading:");
-				onLoad();
-				isLoading = true;
-			}
-		} catch (Exception e) {
-		}
-	}
-
-	@Override
-	public boolean onInterceptTouchEvent(MotionEvent ev) {
-		switch (ev.getAction()) {
-		case MotionEvent.ACTION_DOWN:
-			startY = (int) ev.getY();
-			break;
-
-		default:
-			break;
-		}
-		return super.onInterceptTouchEvent(ev);
-	}
-
-	/**
-	 * 监听触摸事件,解读手式
-	 */
-	@Override
-	public boolean onTouchEvent(MotionEvent ev) {
-		switch (ev.getAction()) {
-		case MotionEvent.ACTION_DOWN:
-//			Log.d(TAG, "=====onTouchEvent down");
-			if (firstVisibleItem == 0) {
-				isRecorded = true;
-				startY = (int) ev.getY();
-			}
-			break;
-		case MotionEvent.ACTION_CANCEL:
-		case MotionEvent.ACTION_UP:
-//			Log.d(TAG, "=====onTouchEvent up");
-			if (state == PULL) {
-//				Log.d(TAG, "=====onTouchEvent up if");
-				state = NONE;
-				refreshHeaderViewByState();
-				onRefresh();
-			} else if (state == RELEASE) {
-//				Log.d(TAG, "=====onTouchEvent up else");
-				state = REFRESHING;
-				refreshHeaderViewByState();
-				onRefresh();
-			}
-			isRecorded = false;
-			break;
-		case MotionEvent.ACTION_MOVE:
-//			Log.d(TAG, "=====onTouchEvent move");
-			if (firstVisibleItem == 0) {
-				isRecorded = true;
-				// startY = (int) ev.getY();
-			}
-			whenMove(ev);
-			break;
-		}
-		return super.onTouchEvent(ev);
-	}
-
-	// 解读手势,刷新header状�??
-	private void whenMove(MotionEvent ev) {
-		if (!isRecorded) {
-//			Log.d("", "=====isrecorded");
-			return;
-		}
-//		Log.d("", "=====isrecord");
-		int tmpY = (int) ev.getY();
-		int space = tmpY - startY;
-		int topPadding = space - headerContentHeight;
-		switch (state) {
-		case NONE:
-			if (space > 0) {
-//				LogMgr.d(TAG, "state1 "+state);
-				state = PULL;
-				refreshHeaderViewByState();
-			}
-			break;
-		case PULL:
-			topPadding(topPadding);
-			if (scrollState == SCROLL_STATE_TOUCH_SCROLL
-					&& space > headerContentHeight + SPACE) {
-//				LogMgr.d(TAG, "state2 "+state);
-				state = RELEASE;
-				refreshHeaderViewByState();
-			}
-			break;
-		case RELEASE:
-			topPadding(topPadding);
-			if (space > 0 && space < headerContentHeight + SPACE) {
-//				LogMgr.d(TAG, "state3 "+state);
-				state = PULL;
-				refreshHeaderViewByState();
-			} else if (space <= 0) {
-//				LogMgr.d(TAG, "state4 "+state);
-				state = NONE;
-				refreshHeaderViewByState();
-			}
-			break;
-		}
-
-	}
-
-	// 调整header的大小�?�其实调整的只是距离顶部的高度�??
-	private void topPadding(int topPadding) {
-		header.setPadding(header.getPaddingLeft(), topPadding,
-				header.getPaddingRight(), header.getPaddingBottom());
-		header.invalidate();
-	}
-
-	public int getmResultSize() {
-		return mResultSize;
-	}
-
-	public void setResultSize(int resultSize) {
-		mResultSize = resultSize;
-		currentSize += resultSize;
-		if (currentSize == 0) {
-			isLoadFull = true;
-			loadFull.setVisibility(View.GONE);
-			loading.setVisibility(View.GONE);
-			more.setVisibility(View.GONE);
-			noData.setVisibility(View.VISIBLE);
-		} else if (resultSize >= 0 && resultSize < pageSize) {
-			isLoadFull = true;
-			loadFull.setVisibility(View.VISIBLE);
-			loading.setVisibility(View.GONE);
-			more.setVisibility(View.GONE);
-			noData.setVisibility(View.GONE);
-		} else if (resultSize == pageSize) {
-			isLoadFull = false;
-			loadFull.setVisibility(View.GONE);
-			loading.setVisibility(View.VISIBLE);
-			more.setVisibility(View.VISIBLE);
-			noData.setVisibility(View.GONE);
-		}
-
-	}
-
-	// 根据当前状�?�,调整header
-	private void refreshHeaderViewByState() {
-		switch (state) {
-		case NONE:
-			topPadding(-headerContentHeight);
-			tip.setText(R.string.pull_to_refresh);
-			refreshing.setVisibility(View.GONE);
-			arrow.clearAnimation();
-			arrow.setImageResource(R.mipmap.pull_to_refresh_arrow);
-			break;
-		case PULL:
-			arrow.setVisibility(View.VISIBLE);
-			tip.setVisibility(View.VISIBLE);
-			lastUpdate.setVisibility(View.VISIBLE);
-			refreshing.setVisibility(View.GONE);
-			tip.setText(R.string.pull_to_refresh);
-			arrow.clearAnimation();
-			arrow.setAnimation(reverseAnimation);
-			break;
-		case RELEASE:
-			arrow.setVisibility(View.VISIBLE);
-			tip.setVisibility(View.VISIBLE);
-			lastUpdate.setVisibility(View.VISIBLE);
-			refreshing.setVisibility(View.GONE);
-			tip.setText(R.string.release_to_refresh);
-			arrow.clearAnimation();
-			arrow.setAnimation(animation);
-			break;
-		case REFRESHING:
-			topPadding(headerContentInitialHeight);
-			refreshing.setVisibility(View.VISIBLE);
-			arrow.clearAnimation();
-			arrow.setVisibility(View.GONE);
-			tip.setVisibility(View.GONE);
-			lastUpdate.setVisibility(View.GONE);
-			break;
-		}
-	}
-
-	// 用来计算header大小的�?�比较隐晦�?�因为header的初始高度就�?0,貌似可以不用�?
-	private void measureView(View child) {
-		ViewGroup.LayoutParams p = child.getLayoutParams();
-		if (p == null) {
-			p = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
-					ViewGroup.LayoutParams.WRAP_CONTENT);
-		}
-		int childWidthSpec = ViewGroup.getChildMeasureSpec(0, 0 + 0, p.width);
-		int lpHeight = p.height;
-		int childHeightSpec;
-		if (lpHeight > 0) {
-			childHeightSpec = MeasureSpec.makeMeasureSpec(lpHeight,
-					MeasureSpec.EXACTLY);
-		} else {
-			childHeightSpec = MeasureSpec.makeMeasureSpec(0,
-					MeasureSpec.UNSPECIFIED);
-		}
-		child.measure(childWidthSpec, childHeightSpec);
-	}
-	
-	public View getHeadView() {
-		return header;
-	}
-
-	public View getFooterView() {
-		return footer;
-	}
-
-	public void hideFooterView() {
-		footer.setVisibility(View.GONE);
-		this.removeHeaderView(header);
-	}
-
-	/*
-	 * 定义下拉刷新接口
-	 */
-	public interface OnRefreshListener {
-		public void onRefresh();
-	}
-
-	/*
-	 * 定义加载更多接口
-	 */
-	public interface OnLoadListener {
-		public void onLoad();
-	}
-}

+ 0 - 782
gaode/src/main/java/com/quansu/gaode/activity/GaodeActivity.java

@@ -1,782 +0,0 @@
-package com.zswc.gaode.activity;
-
-import android.app.ProgressDialog;
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.BitmapFactory;
-import android.graphics.Color;
-import android.graphics.Point;
-import android.os.Bundle;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.View;
-import android.view.animation.Interpolator;
-import android.widget.AdapterView;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.ListView;
-import android.widget.RadioGroup;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import androidx.annotation.Nullable;
-import androidx.appcompat.app.AppCompatActivity;
-
-
-//import com.amap.api.location.AMapLocation;
-//import com.amap.api.location.AMapLocationClient;
-//import com.amap.api.location.AMapLocationClientOption;
-//import com.amap.api.location.AMapLocationListener;
-import com.amap.api.location.AMapLocation;
-import com.amap.api.location.AMapLocationClient;
-import com.amap.api.location.AMapLocationClientOption;
-import com.amap.api.location.AMapLocationListener;
-import com.amap.api.maps.AMap;
-import com.amap.api.maps.CameraUpdate;
-import com.amap.api.maps.CameraUpdateFactory;
-import com.amap.api.maps.LocationSource;
-import com.amap.api.maps.MapView;
-import com.amap.api.maps.model.BitmapDescriptorFactory;
-import com.amap.api.maps.model.CameraPosition;
-import com.amap.api.maps.model.LatLng;
-import com.amap.api.maps.model.Marker;
-import com.amap.api.maps.model.MarkerOptions;
-import com.amap.api.maps.model.MyLocationStyle;
-import com.amap.api.maps.model.animation.Animation;
-import com.amap.api.maps.model.animation.TranslateAnimation;
-import com.amap.api.services.core.AMapException;
-import com.amap.api.services.core.LatLonPoint;
-import com.amap.api.services.core.PoiItem;
-import com.amap.api.services.geocoder.GeocodeQuery;
-import com.amap.api.services.geocoder.GeocodeResult;
-import com.amap.api.services.geocoder.GeocodeSearch;
-import com.amap.api.services.geocoder.RegeocodeQuery;
-import com.amap.api.services.geocoder.RegeocodeResult;
-import com.amap.api.services.poisearch.PoiResult;
-import com.amap.api.services.poisearch.PoiSearch;
-import com.githang.statusbar.StatusBarCompat;
-
-import com.jaeger.library.StatusBarUtil;
-import com.zswc.gaode.R;
-import com.zswc.gaode.adapter.SearchResultAdapter;
-import com.zswc.gaode.view.SegmentedGroup;
-import com.ysnows.base.ccretrofit.CCRetrofit;
-import com.ysnows.base.model.PositionBean;
-import com.ysnows.base.route.IApp;
-import com.ysnows.base.utils.UiSwitch;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-public class GaodeActivity extends AppCompatActivity implements LocationSource,
-        AMapLocationListener, GeocodeSearch.OnGeocodeSearchListener, PoiSearch.OnPoiSearchListener {
-
-    private static final int REQUEST_SEARCH_CODE = 1;
-
-
-    private ListView listView;
-    AdapterView.OnItemClickListener onItemClickListener = new AdapterView.OnItemClickListener() {
-        @Override
-        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-            if (position != searchResultAdapter.getSelectedPosition()) {
-
-                PoiItem poiItem = (PoiItem) searchResultAdapter.getItem(position);
-
-                chosepoiItem = poiItem;
-                LatLng curLatlng = new LatLng(poiItem.getLatLonPoint().getLatitude(), poiItem.getLatLonPoint().getLongitude());
-
-
-                isItemClickAction = true;
-
-                aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(curLatlng, 16f));
-
-                searchResultAdapter.setSelectedPosition(position);
-                searchResultAdapter.notifyDataSetChanged();
-            }
-        }
-    };
-
-
-    private SegmentedGroup mSegmentedGroup;
-    private AMap aMap;
-    private MapView mapView;
-    private OnLocationChangedListener mListener;
-    private AMapLocationClient mlocationClient;
-    private AMapLocationClientOption mLocationOption;
-
-
-    private Marker locationMarker;
-
-    private ProgressDialog progDialog = null;
-    private GeocodeSearch geocoderSearch;
-
-    private int currentPage = 0;// 当前页面,从0开始计数
-    private PoiSearch.Query query;// Poi查询条件类
-    private PoiSearch poiSearch;
-    private List<PoiItem> poiItems;// poi数据
-
-    private String searchType = "";
-    private String searchKey = "";
-    private LatLonPoint searchLatlonPoint;
-    private LinearLayout currentLocation;//选择当前的定位位置 :注意 可能只有经纬度
-
-
-    private List<PoiItem> resultData;
-
-    private SearchResultAdapter searchResultAdapter;
-
-    private boolean isItemClickAction;
-
-
-    private ImageView imgLeft;
-    private TextView tvRight;
-
-    private PoiItem chosepoiItem;//选择的地点
-
-
-    private String adress = null;//地址
-
-    private String s1 = "";//第二个参数传入null或者“”代表在全国进行检索,否则按照传入的city进行检索
-    private TextView tv;
-
-    private Double lat, lng;
-    private boolean isChose = false;
-    private String loc_address;
-
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setStatusBar();
-
-        super.setContentView(R.layout.activity_gaode);
-
-
-
-
-        Bundle bundle = getIntent().getExtras();
-        if (null != bundle) {
-           // adress = bundle.getString("adress");
-            loc_address=bundle.getString("address");
-            s1 = bundle.getString("city");
-        }
-        Log.e("-shy-", "s1=: " + s1);
-
-
-        mapView = (MapView) findViewById(R.id.map);
-        mapView.onCreate(savedInstanceState);
-        init();
-
-        initView();
-
-        resultData = new ArrayList<>();
-
-
-
-
-    }
-
-    private LinearLayout llSearch;
-
-    private void initView() {
-
-        llSearch = findViewById(R.id.ll_search);
-        tv = findViewById(R.id.tv);
-
-        imgLeft = findViewById(R.id.img_left);
-        tvRight = findViewById(R.id.tv_right);
-
-        currentLocation = findViewById(R.id.current_location);
-
-        listView = (ListView) findViewById(R.id.listview);
-        searchResultAdapter = new SearchResultAdapter(GaodeActivity.this);
-        listView.setAdapter(searchResultAdapter);
-
-        listView.setOnItemClickListener(onItemClickListener);
-
-        mSegmentedGroup = (SegmentedGroup) findViewById(R.id.segmented_group);
-        mSegmentedGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
-            @Override
-            public void onCheckedChanged(RadioGroup group, int checkedId) {
-                searchType = items[0];
-
-                if (checkedId == R.id.radio0) {
-                    searchType = items[0];
-                } else if (checkedId == R.id.radio1) {
-                    searchType = items[1];
-                } else if (checkedId == R.id.radio2) {
-                    searchType = items[2];
-                } else if (checkedId == R.id.radio3) {
-                    searchType = items[3];
-                }
-
-                geoAddress();
-            }
-        });
-
-
-        geocoderSearch = new GeocodeSearch(this);
-        geocoderSearch.setOnGeocodeSearchListener(this);
-        progDialog = new ProgressDialog(this);
-
-
-        imgLeft.setOnClickListener(view -> {
-            finish();
-        });
-
-        tvRight.setOnClickListener(view -> {
-
-            //  LatLng curLatlng = new LatLng(chosepoiItem.getLatLonPoint().getLatitude(), chosepoiItem.getLatLonPoint().getLongitude());
-
-            Toast.makeText(this, "选择了" + chosepoiItem.getTitle(), Toast.LENGTH_SHORT).show();
-
-            //逆地址编码
-            getAddressByLatlng(chosepoiItem.getLatLonPoint().getLatitude(), chosepoiItem.getLatLonPoint().getLongitude());
-
-
-//            String latitude = String.valueOf(chosepoiItem.getLatLonPoint().getLatitude());
-//            String longitude = String.valueOf(chosepoiItem.getLatLonPoint().getLongitude());
-//            String provincename = chosepoiItem.getProvinceName();
-//            String cityname = chosepoiItem.getCityName();
-//            String areaname = chosepoiItem.getAdName();
-//
-//
-//            Log.e("-shy-", "provincename=: " + provincename + "/cityname=" + cityname + "/areaname=" + areaname);
-//
-//
-//            PositionBean positionBean = new PositionBean(chosepoiItem.getTitle(), latitude, longitude, provincename, cityname, areaname);
-//
-//            CCRetrofit.instance()
-//                    .create(IApp.class)
-//                    .setDatas(positionBean)
-//                    .subscribe();
-//
-//            finish();
-
-
-        });
-
-
-        if (!TextUtils.isEmpty(adress)) {
-
-            tvRight.setVisibility(View.INVISIBLE);
-
-        }
-
-        llSearch.setOnClickListener(v -> {
-            UiSwitch.singleRes(this, SearchAddressActivity.class, REQUEST_SEARCH_CODE);
-        });
-
-
-        currentLocation.setOnClickListener(v -> {
-
-            if (null != searchLatlonPoint) {
-
-                Toast.makeText(this, "选择了当前定位位置", Toast.LENGTH_SHORT).show();
-
-
-                getAddressByLatlng(chosepoiItem.getLatLonPoint().getLatitude(), chosepoiItem.getLatLonPoint().getLongitude());
-
-//                String latitude = String.valueOf(lat);
-//                String longitude = String.valueOf(lng);
-//                String title = "经度:" + longitude + "/维度:" + latitude;
-//
-//                //省市区大概的位置是不会变的
-//                String provincename = chosepoiItem.getProvinceName();
-//                String cityname = chosepoiItem.getCityName();
-//                String areaname = chosepoiItem.getAdName();
-//                //AMapLocation
-//
-//                Log.e("-shy-", "provincename=: " + provincename + "/cityname=" + cityname + "/areaname=" + areaname);
-//
-//                PositionBean positionBean = new PositionBean(title, latitude, longitude,
-//                        provincename, cityname, areaname);
-//
-//                CCRetrofit.instance()
-//                        .create(IApp.class)
-//                        .setDatas(positionBean)
-//                        .subscribe();
-//
-//                finish();
-
-            } else {
-
-                Toast.makeText(this, "无法获得当前位置", Toast.LENGTH_LONG).show();
-
-            }
-
-        });
-
-
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-        if (requestCode == REQUEST_SEARCH_CODE && resultCode == 6) {
-            PoiItem searchPonItem = data.getParcelableExtra("poiItem");
-            LatLonPoint latLonPoint = searchPonItem.getLatLonPoint();
-            //移动标志和地图
-            // addmark(latLonPoint.getLatitude(),latLonPoint.getLongitude());
-            aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latLonPoint.getLatitude(), latLonPoint.getLongitude()), 14));
-            //重新搜索附近
-            //数据清空
-            searchKey = searchPonItem.getCityName();
-            String name = data.getStringExtra("name");
-            tv.setText(name);
-            searchLatlonPoint = new LatLonPoint(latLonPoint.getLatitude(), latLonPoint.getLongitude());
-
-
-            doSearchQuery();
-
-        }
-    }
-
-    private String[] items = {"", "学校", "楼宇", "商场"};
-
-    /**
-     * 设置一些amap的属性
-     */
-    private void setUpMap() {
-        aMap.getUiSettings().setZoomControlsEnabled(false);
-        aMap.setLocationSource(this);// 设置定位监听
-        aMap.getUiSettings().setMyLocationButtonEnabled(true);// 设置默认定位按钮是否显示
-        aMap.setMyLocationEnabled(true);// 设置为true表示显示定位层并可触发定位,false表示隐藏定位层并不可触发定位,默认是false
-        aMap.setMyLocationType(AMap.LOCATION_TYPE_LOCATE);
-
-    }
-
-    //dip和px转换
-    private static int dip2px(Context context, float dpValue) {
-        final float scale = context.getResources().getDisplayMetrics().density;
-        return (int) (dpValue * scale + 0.5f);
-    }
-
-    protected void setStatusBar() {
-        StatusBarUtil.setDarkMode(this);
-        StatusBarUtil.setColor(this, getResources().getColor(R.color.color_bg), 1);
-        StatusBarCompat.setStatusBarColor(this, Color.parseColor("#00ffffff"));
-
-    }
-
-    /**
-     * 初始化
-     */
-    private void init() {
-        if (aMap == null) {
-            aMap = mapView.getMap();
-            setUpMap();
-        }
-
-        aMap.setOnCameraChangeListener(new AMap.OnCameraChangeListener() {
-            @Override
-            public void onCameraChange(CameraPosition cameraPosition) {
-
-            }
-
-            @Override
-            public void onCameraChangeFinish(CameraPosition cameraPosition) {
-
-                lat = cameraPosition.target.latitude;
-                lng = cameraPosition.target.longitude;
-
-
-                if (!isItemClickAction) {
-                    geoAddress();
-                    //todo:暂时去掉动画
-                    //startJumpAnimation();
-                }
-                searchLatlonPoint = new LatLonPoint(cameraPosition.target.latitude, cameraPosition.target.longitude);
-
-                isItemClickAction = false;
-            }
-        });
-
-        aMap.setOnMapLoadedListener(new AMap.OnMapLoadedListener() {
-            @Override
-            public void onMapLoaded() {
-                addMarkerInScreenCenter(null);
-            }
-        });
-    }
-
-    /**
-     * 方法必须重写
-     */
-    @Override
-    protected void onResume() {
-        super.onResume();
-        mapView.onResume();
-    }
-
-    /**
-     * 方法必须重写
-     */
-    @Override
-    protected void onPause() {
-        super.onPause();
-        mapView.onPause();
-        deactivate();
-    }
-
-    /**
-     * 激活定位
-     */
-    @Override
-    public void activate(OnLocationChangedListener listener) {
-        mListener = listener;
-        if (mlocationClient == null) {
-            mlocationClient = new AMapLocationClient(this);
-            mLocationOption = new AMapLocationClientOption();
-            //设置定位监听
-            mlocationClient.setLocationListener(this);
-            //设置为高精度定位模式
-            mLocationOption.setOnceLocation(true);
-            mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy);
-            // 设置是否需要显示地址信息
-            mLocationOption.setNeedAddress(true);
-            //设置定位参数
-            mlocationClient.setLocationOption(mLocationOption);
-
-
-            // 此方法为每隔固定时间会发起一次定位请求,为了减少电量消耗或网络流量消耗,
-            // 注意设置合适的定位时间的间隔(最小间隔支持为2000ms),并且在合适时间调用stopLocation()方法来取消定位请求
-            // 在定位结束后,在合适的生命周期调用onDestroy()方法
-            // 在单次定位情况下,定位无论成功与否,都无需调用stopLocation()方法移除请求,定位sdk内部会移除
-            mlocationClient.startLocation();
-        }
-    }
-
-    /**
-     * 停止定位
-     */
-    @Override
-    public void deactivate() {
-        mListener = null;
-        if (mlocationClient != null) {
-            mlocationClient.stopLocation();
-            mlocationClient.onDestroy();
-        }
-        mlocationClient = null;
-    }
-
-
-    /**
-     * 响应逆地理编码
-     */
-    public void geoAddress() {
-//        Log.i("MY", "geoAddress"+ searchLatlonPoint.toString());
-        showDialog();
-        if (searchLatlonPoint != null) {
-            RegeocodeQuery query = new RegeocodeQuery(searchLatlonPoint, 200, GeocodeSearch.AMAP);// 第一个参数表示一个Latlng,第二参数表示范围多少米,第三个参数表示是火系坐标系还是GPS原生坐标系
-            geocoderSearch.getFromLocationAsyn(query);
-        }
-    }
-
-
-    /**
-     * 开始进行poi搜索
-     */
-    protected void doSearchQuery() {
-//        Log.i("MY", "doSearchQuery");
-        currentPage = 0;//searchKey  searchType
-        query = new PoiSearch.Query(searchKey, searchType, "");// 第一个参数表示搜索字符串,第二个参数表示poi搜索类型,第三个参数表示poi搜索区域(空字符串代表全国)
-        query.setCityLimit(true);
-        query.setPageSize(30);
-        query.setPageNum(currentPage);
-
-        poiSearch = new PoiSearch(this, query);
-        poiSearch.setOnPoiSearchListener(this);
-        poiSearch.setBound(new PoiSearch.SearchBound(searchLatlonPoint, 1000, true));//
-        poiSearch.searchPOIAsyn();
-
-    }
-
-    /**
-     * 方法必须重写
-     */
-    @Override
-    protected void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-        mapView.onSaveInstanceState(outState);
-    }
-
-    /**
-     * 方法必须重写
-     */
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        mapView.onDestroy();
-        if (null != mlocationClient) {
-            mlocationClient.onDestroy();
-        }
-    }
-
-    /**
-     * POI搜索结果回调
-     *
-     * @param poiResult  搜索结果
-     * @param resultCode 错误码
-     */
-    @Override
-    public void onPoiSearched(PoiResult poiResult, int resultCode) {
-        if (resultCode == AMapException.CODE_AMAP_SUCCESS) {
-            if (poiResult != null && poiResult.getQuery() != null) {
-                if (poiResult.getQuery().equals(query)) {
-                    poiItems = poiResult.getPois();
-                    if (poiItems != null && poiItems.size() > 0) {
-                        updateListview(poiItems);
-                    } else {
-                        Toast.makeText(GaodeActivity.this, "无搜索结果", Toast.LENGTH_SHORT).show();
-                    }
-                }
-            } else {
-                Toast.makeText(GaodeActivity.this, "无搜索结果", Toast.LENGTH_SHORT).show();
-            }
-        }
-    }
-
-    /**
-     * 更新列表中的item
-     *
-     * @param poiItems
-     */
-    private void updateListview(List<PoiItem> poiItems) {
-        resultData.clear();
-        searchResultAdapter.setSelectedPosition(0);
-        //todo:
-        chosepoiItem = poiItems.get(0);
-
-        // resultData.add(firstItem);
-        resultData.addAll(poiItems);
-
-        searchResultAdapter.setData(resultData);
-        searchResultAdapter.notifyDataSetChanged();
-
-
-        if (!TextUtils.isEmpty(adress)) {
-            Toast.makeText(this, adress, Toast.LENGTH_SHORT).show();
-
-            tvRight.setVisibility(View.INVISIBLE);
-
-
-            adress = null;
-        }
-    }
-
-    /**
-     * 定位成功后回调函数
-     */
-    @Override
-    public void onLocationChanged(AMapLocation amapLocation) {
-        if (mListener != null && amapLocation != null) {
-            if (amapLocation != null
-                    && amapLocation.getErrorCode() == 0) {
-                mListener.onLocationChanged(amapLocation);
-
-                LatLng curLatlng = new LatLng(amapLocation.getLatitude(), amapLocation.getLongitude());
-
-                searchLatlonPoint = new LatLonPoint(curLatlng.latitude, curLatlng.longitude);
-
-                aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(curLatlng, 16f));
-
-
-            } else {
-                String errText = "定位失败," + amapLocation.getErrorCode() + ": " + amapLocation.getErrorInfo();
-                Log.e("AmapErr", errText);
-            }
-        }
-    }
-
-
-    private void getAddressByLatlng(double latitude, double longitude) {
-
-        lat = latitude;
-        lng = longitude;
-
-        isChose = true;
-        //逆地理编码查询条件:逆地理编码查询的地理坐标点、查询范围、坐标类型。
-        LatLonPoint latLonPoint = new LatLonPoint(latitude, longitude);
-        RegeocodeQuery query = new RegeocodeQuery(latLonPoint, 500f, GeocodeSearch.AMAP);
-        //异步查询
-        geocoderSearch.getFromLocationAsyn(query);
-    }
-
-
-    @Override
-    public void onRegeocodeSearched(RegeocodeResult result, int rCode) {
-        dismissDialog();
-        if (rCode == AMapException.CODE_AMAP_SUCCESS) {
-            if (result != null && result.getRegeocodeAddress() != null
-                    && result.getRegeocodeAddress().getFormatAddress() != null) {
-//                firstItem = new PoiItem("regeo", searchLatlonPoint, address, address);
-//                chosepoiItem=firstItem;
-
-                if (isChose) {
-
-
-                    PositionBean positionBean = new PositionBean(chosepoiItem.getTitle(),
-                            String.valueOf(lat), String.valueOf(lng), result.getRegeocodeAddress().getProvince(),
-                            result.getRegeocodeAddress().getCity(),
-                            result.getRegeocodeAddress().getDistrict(),
-                            result.getRegeocodeAddress().getAdCode()
-                    );
-
-                    String address = result.getRegeocodeAddress().getProvince() +
-                            result.getRegeocodeAddress().getCity() +
-                            result.getRegeocodeAddress().getDistrict() +
-                            result.getRegeocodeAddress().getTownship();
-
-
-                    Log.e("shy", "address=" + address);
-                    Log.e("shy", "lat=" + lat + "//lng=" + lng);
-
-                    CCRetrofit.instance()
-                            .create(IApp.class)
-                            .setDatas(positionBean)
-                            .subscribe();
-
-                    finish();
-
-                    return;
-                }
-
-                doSearchQuery();
-
-                if (!TextUtils.isEmpty(s1)) {//s1是市
-                    GeocodeQuery query = new GeocodeQuery(loc_address, s1);
-                    geocoderSearch.getFromLocationNameAsyn(query);
-                    s1="";
-
-                }
-
-
-            }
-        } else {
-            Toast.makeText(GaodeActivity.this, "error code is " + rCode, Toast.LENGTH_SHORT).show();
-        }
-    }
-
-    @Override
-    public void onGeocodeSearched(GeocodeResult geocodeResult, int i) {
-
-        Log.e("-shy-", "onGeocodeSearched:= " + geocodeResult);
-
-
-        if(i==1000){//成功
-
-            LatLng latLng = new LatLng(geocodeResult.getGeocodeAddressList().get(0).getLatLonPoint().getLatitude(),geocodeResult.getGeocodeAddressList().get(0).getLatLonPoint().getLongitude());
-            CameraPosition cameraPosition = new CameraPosition(latLng, 15, 0, 30);
-            CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);
-            aMap.moveCamera(cameraUpdate);
-            drawMarkers(latLng);
-        }
-
-    }
-
-    //画定位标记图
-    public void drawMarkers( LatLng latLng ) {
-        MarkerOptions markerOptions = new MarkerOptions()
-                .position(latLng)
-                .icon(BitmapDescriptorFactory.fromResource(R.mipmap.poi_marker_1))
-                .draggable(true);
-        Marker marker = aMap.addMarker(markerOptions);
-        marker.showInfoWindow();
-    }
-
-
-
-
-    @Override
-    public void onPoiItemSearched(PoiItem poiItem, int i) {
-
-    }
-
-    private void addMarkerInScreenCenter(LatLng locationLatLng) {
-        LatLng latLng = aMap.getCameraPosition().target;
-        Point screenPosition = aMap.getProjection().toScreenLocation(latLng);
-
-        View markerView = getLayoutInflater().inflate(R.layout.gaode_item_marker, null);
-
-        locationMarker = aMap.addMarker(new MarkerOptions()
-                .anchor(0.5f, 0.5f)
-                .title("当前位置")
-                .visible(true)
-                .icon(BitmapDescriptorFactory.fromView(markerView)));
-
-        //.icon(BitmapDescriptorFactory.fromResource(R.drawable.purple_pin)));
-        //设置Marker在屏幕上,不跟随地图移动
-        locationMarker.setPositionByPixels(screenPosition.x, screenPosition.y);
-        locationMarker.setZIndex(1);
-
-    }
-
-    private void addmark(double latitude, double longitude) {
-
-        if (locationMarker == null) {
-            locationMarker = aMap.addMarker(new MarkerOptions()
-                    .position(new LatLng(latitude, longitude))
-                    .icon(BitmapDescriptorFactory.fromBitmap(BitmapFactory
-                            .decodeResource(getResources(), R.mipmap.poi_marker_1)))
-                    .draggable(true));
-        } else {
-            locationMarker.setPosition(new LatLng(latitude, longitude));
-        }
-    }
-
-
-    /**
-     * 屏幕中心marker 跳动
-     */
-    public void startJumpAnimation() {
-
-        if (locationMarker != null) {
-            //根据屏幕距离计算需要移动的目标点
-            final LatLng latLng = locationMarker.getPosition();
-            Point point = aMap.getProjection().toScreenLocation(latLng);
-            point.y -= dip2px(this, 125);
-            LatLng target = aMap.getProjection()
-                    .fromScreenLocation(point);
-            //使用TranslateAnimation,填写一个需要移动的目标点
-            Animation animation = new TranslateAnimation(target);
-            animation.setInterpolator(new Interpolator() {
-                @Override
-                public float getInterpolation(float input) {
-                    // 模拟重加速度的interpolator
-                    if (input <= 0.5) {
-                        return (float) (0.5f - 2 * (0.5 - input) * (0.5 - input));
-                    } else {
-                        return (float) (0.5f - Math.sqrt((input - 0.5f) * (1.5f - input)));
-                    }
-                }
-            });
-            //整个移动所需要的时间
-            animation.setDuration(600);
-            //设置动画
-            locationMarker.setAnimation(animation);
-            //开始动画
-            locationMarker.startAnimation();
-
-        } else {
-            Log.e("ama", "screenMarker is null");
-        }
-    }
-
-    public void showDialog() {
-        progDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
-        progDialog.setIndeterminate(false);
-        progDialog.setCancelable(true);
-        progDialog.setMessage("正在加载...");
-        progDialog.show();
-    }
-
-    public void dismissDialog() {
-        if (progDialog != null) {
-            progDialog.dismiss();
-        }
-    }
-
-
-}

+ 0 - 606
gaode/src/main/java/com/quansu/gaode/activity/PolylineActivity.java

@@ -1,606 +0,0 @@
-package com.zswc.gaode.activity;
-
-import android.graphics.Color;
-import android.os.Bundle;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.amap.api.maps.AMap;
-import com.amap.api.maps.CameraUpdateFactory;
-import com.amap.api.maps.MapView;
-import com.amap.api.maps.model.BitmapDescriptor;
-import com.amap.api.maps.model.BitmapDescriptorFactory;
-import com.amap.api.maps.model.LatLng;
-import com.amap.api.maps.model.MarkerOptions;
-import com.amap.api.maps.model.PolylineOptions;
-import com.amap.api.navi.AMapNavi;
-import com.amap.api.navi.AMapNaviListener;
-import com.amap.api.navi.enums.NaviType;
-import com.amap.api.navi.enums.PathPlanningStrategy;
-import com.amap.api.navi.model.AMapCalcRouteResult;
-import com.amap.api.navi.model.AMapCarInfo;
-import com.amap.api.navi.model.AMapLaneInfo;
-import com.amap.api.navi.model.AMapModelCross;
-import com.amap.api.navi.model.AMapNaviCameraInfo;
-import com.amap.api.navi.model.AMapNaviCross;
-import com.amap.api.navi.model.AMapNaviLocation;
-import com.amap.api.navi.model.AMapNaviPath;
-import com.amap.api.navi.model.AMapNaviRouteNotifyData;
-import com.amap.api.navi.model.AMapNaviTrafficFacilityInfo;
-import com.amap.api.navi.model.AMapServiceAreaInfo;
-import com.amap.api.navi.model.AimLessModeCongestionInfo;
-import com.amap.api.navi.model.AimLessModeStat;
-import com.amap.api.navi.model.NaviInfo;
-import com.amap.api.navi.model.NaviLatLng;
-import com.amap.api.services.core.LatLonPoint;
-import com.githang.statusbar.StatusBarCompat;
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
-import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton;
-import com.zswc.gaode.R;
-import com.zswc.gaode.utils.AMapUtil;
-import com.ysnows.base.dialog.QMUIProgressDialog;
-import com.ysnows.base.model.PositionBean;
-
-import org.jetbrains.annotations.NotNull;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import androidx.annotation.Nullable;
-import androidx.appcompat.app.AppCompatActivity;
-
-/**
- * Created by shihuiyun
- * on 2020/10/15
- */
-public class PolylineActivity extends AppCompatActivity {
-    private AMap aMap;
-    private MapView mapView;
-
-    private AMap aMapTwo;
-    private AMap aMapThree;
-    private MapView mapTwo;
-    private MapView mapThree;
-
-
-    private ImageView imgBack;
-    private TextView tvStart;
-    private TextView tvEnd;
-    private LinearLayout llBottom;
-    private QMUIRoundButton butOne;
-    private QMUIRoundButton butTwo;
-    private QMUIRoundButton butThree;
-    private List<LatLng> list;
-    private List<PositionBean> item;
-
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        StatusBarCompat.setStatusBarColor(this, Color.parseColor("#00ffffff"));
-
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.map_layout);
-
-        item = new Gson().fromJson(getIntent().getStringExtra("item"), new TypeToken<List<PositionBean>>() {
-        }.getType());
-
-
-        imgBack = findViewById(R.id.img_back);
-        tvStart = findViewById(R.id.tv_start);
-        tvEnd = findViewById(R.id.tv_end);
-        llBottom = findViewById(R.id.ll_bottom);
-
-        butOne = findViewById(R.id.but_one);
-        butTwo = findViewById(R.id.but_two);
-        butThree = findViewById(R.id.but_three);
-        tvStart.setText(item.get(0).position);
-        tvEnd.setText(item.get(item.size() - 1).position);
-
-
-        imgBack.setOnClickListener(v -> {
-            finish();
-        });
-
-        mapView = (MapView) findViewById(R.id.map);
-        mapTwo = findViewById(R.id.map_two);
-        mapThree = findViewById(R.id.map_three);
-        mapView.onCreate(savedInstanceState);// 此方法必须重写
-        mapTwo.onCreate(savedInstanceState);// 此方法必须重写
-        mapThree.onCreate(savedInstanceState);// 此方法必须重写
-
-
-        butOne.setOnClickListener(view -> {
-            Toast.makeText(this, "切换路线一", Toast.LENGTH_SHORT).show();
-
-            mapView.setVisibility(View.VISIBLE);
-            mapTwo.setVisibility(View.GONE);
-            mapThree.setVisibility(View.GONE);
-
-        });
-
-        butTwo.setOnClickListener(view -> {
-            Toast.makeText(this, "切换路线二", Toast.LENGTH_SHORT).show();
-            mapTwo.setVisibility(View.VISIBLE);
-            mapThree.setVisibility(View.GONE);
-            mapView.setVisibility(View.GONE);
-        });
-        butThree.setOnClickListener(view -> {
-            Toast.makeText(this, "切换路线三", Toast.LENGTH_SHORT).show();
-
-            mapTwo.setVisibility(View.GONE);
-            mapThree.setVisibility(View.VISIBLE);
-            mapView.setVisibility(View.GONE);
-        });
-
-
-        aMap = mapView.getMap();
-        aMapTwo = mapTwo.getMap();
-        aMapThree = mapThree.getMap();
-
-        getRoute();
-
-    }
-
-
-    //获取路线 多条 三条或者一条
-    protected List<NaviLatLng> navOne = new ArrayList<NaviLatLng>();
-    protected List<NaviLatLng> navTwo = new ArrayList<NaviLatLng>();
-    protected List<NaviLatLng> navThree = new ArrayList<NaviLatLng>();
-
-    public void setShow() {
-
-        if (navOne.size() > 0) {
-            llBottom.setVisibility(View.VISIBLE);
-            butOne.setVisibility(View.VISIBLE);
-            list = getshowList(navOne);
-            setUpMap(aMap);
-        }
-        if (navTwo.size() > 0) {
-            butTwo.setVisibility(View.VISIBLE);
-            list = getshowList(navTwo);
-            setUpMap(aMapTwo);
-        }
-
-        if (navThree.size() > 0) {
-            butThree.setVisibility(View.VISIBLE);
-            list = getshowList(navThree);
-            setUpMap(aMapThree);
-        }
-
-        if (navOne.size() == 0 && navTwo.size() == 0 && navThree.size() == 0) {
-            list = showListLat(item);
-            setUpMap(aMap);
-        }
-
-    }
-
-
-    public void getRoute() {
-        // 构建车辆信息
-        AMapCarInfo carInfo = new AMapCarInfo();
-        if(!TextUtils.isEmpty(item.get(0).brand)) {
-            Log.e("-shy-", "Route=: "+ item.get(0).brand);
-            carInfo.setCarNumber(item.get(0).brand); //设置车牌号
-        }
-//        carInfo.setCarType("1");             //设置车辆类型,0:小车; 1:货车. 默认0(小车).
-//        carInfo.setVehicleAxis("6");         //设置货车的轴数,mCarType = 1时候生效,取值[0-255],默认为2
-//        carInfo.setVehicleHeight("3.56");    //设置货车的高度,单位:米,mCarType = 1时候生效,取值[0-25.5],默认1.6米
-//        carInfo.setVehicleLength("7.3");     //设置货车的最大长度,单位:米,mCarType = 1时候生效,取值[0-25],默认6米
-//        carInfo.setVehicleWidth("2.5");      //设置货车的最大宽度,单位:米,mCarType = 1时候生效,取值[0-25.5],默认2.5米
-//        carInfo.setVehicleSize("4");         //设置货车的大小,1-微型货车 2-轻型/小型货车 3-中型货车 4-重型货车,默认为2
-//        carInfo.setVehicleLoad("25.99");     //设置货车的总重,即车重+核定载重,单位:吨,mCarType = 1时候生效,取值[0-6553.5]
-//        carInfo.setVehicleWeight("20");      //设置货车的核定载重,单位:吨,mCarType = 1时候生效,取值[0-6553.5]
-//        carInfo.setRestriction(true);        //设置是否躲避车辆限行,true代表躲避车辆限行,false代表不躲避车辆限行,默认为true
-//        carInfo.setVehicleLoadSwitch(true);   //设置货车重量是否参与算路,true-重量会参与算路;false-重量不会参与算路。默认为false
-
-        // 获取导航Manager
-        AMapNavi mAMapNavi = AMapNavi.getInstance(this);
-
-        mAMapNavi.setCarInfo(carInfo);
-
-//         起点信息
-        List<NaviLatLng> startList = initStartPoint(item.get(0));
-//         终点信息
-        List<NaviLatLng> endList = initEndPoint(item.get(item.size() - 1));
-        //中间停靠点
-        List<NaviLatLng> centerList = initCenterPointList();
-        // 经纬度算路
-        mAMapNavi.calculateDriveRoute(startList, endList, centerList,
-                PathPlanningStrategy.DRIVING_MULTIPLE_ROUTES_DEFAULT);
-
-        QMUIProgressDialog qmuiProgressDialog = new QMUIProgressDialog();
-        qmuiProgressDialog.show(this,"正在规划路线...");
-
-
-        addCenterListMarker(centerList);
-
-        mAMapNavi.addAMapNaviListener(new AMapNaviListener() {
-            @Override
-            public void onCalculateRouteSuccess(AMapCalcRouteResult aMapCalcRouteResult) {
-                qmuiProgressDialog.dismiss();
-                // 获取路线数据对象
-                HashMap<Integer, AMapNaviPath> naviPaths = mAMapNavi.getNaviPaths();
-                // 绘制显示路径 遍历值
-                int i = 0;
-                AMapNavi.getInstance(PolylineActivity.this).startNavi(NaviType.GPS);
-
-                for (AMapNaviPath value : naviPaths.values()) {
-                    if (i == 0) {
-                        navOne.addAll(value.getCoordList());
-                    }
-                    if (i == 1) {
-                        navTwo.addAll(value.getCoordList());
-
-                    }
-                    if (i == 2) {
-                        navThree.addAll(value.getCoordList());
-                    }
-                    i++;
-                }
-
-                setShow();
-
-            }
-
-            @Override
-            public void onInitNaviFailure() {
-
-            }
-
-            @Override
-            public void onInitNaviSuccess() {
-
-            }
-
-            @Override
-            public void onStartNavi(int i) {
-
-            }
-
-            @Override
-            public void onTrafficStatusUpdate() {
-
-            }
-
-            @Override
-            public void onLocationChange(AMapNaviLocation aMapNaviLocation) {
-
-            }
-
-            @Override
-            public void onGetNavigationText(int i, String s) {
-
-            }
-
-            @Override
-            public void onGetNavigationText(String s) {
-
-            }
-
-            @Override
-            public void onEndEmulatorNavi() {
-
-            }
-
-            @Override
-            public void onArriveDestination() {
-
-            }
-
-            @Override
-            public void onCalculateRouteFailure(int i) {
-
-            }
-
-            @Override
-            public void onReCalculateRouteForYaw() {
-
-            }
-
-            @Override
-            public void onReCalculateRouteForTrafficJam() {
-
-            }
-
-            @Override
-            public void onArrivedWayPoint(int i) {
-
-            }
-
-            @Override
-            public void onGpsOpenStatus(boolean b) {
-
-            }
-
-            @Override
-            public void onNaviInfoUpdate(NaviInfo naviInfo) {
-
-            }
-
-            @Override
-            public void updateCameraInfo(AMapNaviCameraInfo[] aMapNaviCameraInfos) {
-
-            }
-
-            @Override
-            public void updateIntervalCameraInfo(AMapNaviCameraInfo aMapNaviCameraInfo, AMapNaviCameraInfo aMapNaviCameraInfo1, int i) {
-
-            }
-
-            @Override
-            public void onServiceAreaUpdate(AMapServiceAreaInfo[] aMapServiceAreaInfos) {
-
-            }
-
-            @Override
-            public void showCross(AMapNaviCross aMapNaviCross) {
-
-            }
-
-            @Override
-            public void hideCross() {
-
-            }
-
-            @Override
-            public void showModeCross(AMapModelCross aMapModelCross) {
-
-            }
-
-            @Override
-            public void hideModeCross() {
-
-            }
-
-            @Override
-            public void showLaneInfo(AMapLaneInfo[] aMapLaneInfos, byte[] bytes, byte[] bytes1) {
-
-            }
-
-            @Override
-            public void showLaneInfo(AMapLaneInfo aMapLaneInfo) {
-
-            }
-
-            @Override
-            public void hideLaneInfo() {
-
-            }
-
-            @Override
-            public void onCalculateRouteSuccess(int[] ints) {
-
-            }
-
-            @Override
-            public void notifyParallelRoad(int i) {
-
-            }
-
-            @Override
-            public void OnUpdateTrafficFacility(AMapNaviTrafficFacilityInfo[] aMapNaviTrafficFacilityInfos) {
-
-            }
-
-            @Override
-            public void OnUpdateTrafficFacility(AMapNaviTrafficFacilityInfo aMapNaviTrafficFacilityInfo) {
-
-            }
-
-            @Override
-            public void updateAimlessModeStatistics(AimLessModeStat aimLessModeStat) {
-
-            }
-
-            @Override
-            public void updateAimlessModeCongestionInfo(AimLessModeCongestionInfo aimLessModeCongestionInfo) {
-
-            }
-
-            @Override
-            public void onPlayRing(int i) {
-
-            }
-
-
-            @Override
-            public void onCalculateRouteFailure(AMapCalcRouteResult aMapCalcRouteResult) {
-
-            }
-
-            @Override
-            public void onNaviRouteNotify(AMapNaviRouteNotifyData aMapNaviRouteNotifyData) {
-
-            }
-
-            @Override
-            public void onGpsSignalWeak(boolean b) {
-
-            }
-        });
-    }
-
-    private List<NaviLatLng> initCenterPointList() {
-        List<NaviLatLng> centerList = new ArrayList<NaviLatLng>();
-        if (item.size() > 2) {
-            int i = 0;
-            for (PositionBean ss : item) {
-                if (i > 0 || i < item.size() - 1) {
-                    if (!TextUtils.isEmpty(ss.latitude) && !TextUtils.isEmpty(ss.longitude)) {
-                        centerList.add(new NaviLatLng(Double.parseDouble(ss.latitude), Double.parseDouble(ss.longitude)));
-                    }
-                }
-                i++;
-            }
-        }
-        //mockCenterList(centerList);
-        return centerList;
-    }
-
-    @NotNull
-    private List<NaviLatLng> initEndPoint(PositionBean end) {
-        List<NaviLatLng> list = new ArrayList<NaviLatLng>();
-        list.add(new NaviLatLng(Double.parseDouble(end.latitude), Double.parseDouble(end.longitude)));
-        return list;
-    }
-
-    @NotNull
-    private List<NaviLatLng> initStartPoint(PositionBean start) {
-        List<NaviLatLng> list = new ArrayList<NaviLatLng>();
-        list.add(new NaviLatLng(Double.parseDouble(start.latitude), Double.parseDouble(start.longitude)));
-        return list;
-    }
-
-    /**
-     * 添加中间点的图标
-     *
-     * @param centerList
-     */
-    private void addCenterListMarker(List<NaviLatLng> centerList) {
-        BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.ic_vehicle);
-
-        for (int i = 0; i < centerList.size(); i++) {
-            NaviLatLng naviLatLng = centerList.get(i);
-            //起点图标
-            aMap.addMarker(new MarkerOptions()
-                    .position(new LatLng(naviLatLng.getLatitude(), naviLatLng.getLongitude()))
-                    .icon(icon));
-        }
-    }
-
-    private void mockCenterList(List<NaviLatLng> centerList) {
-        centerList.add(new NaviLatLng(Double.parseDouble("41.706654"), Double.parseDouble("123.475442")));
-        centerList.add(new NaviLatLng(Double.parseDouble("40.999653"), Double.parseDouble("117.956253")));
-        centerList.add(new NaviLatLng(Double.parseDouble("39.846721"), Double.parseDouble("116.447675")));
-        centerList.add(new NaviLatLng(Double.parseDouble("38.486194"), Double.parseDouble("106.237175")));
-        centerList.add(new NaviLatLng(Double.parseDouble("36.090479"), Double.parseDouble("103.808732")));
-        centerList.add(new NaviLatLng(Double.parseDouble("36.090479"), Double.parseDouble("103.808732")));
-        centerList.add(new NaviLatLng(Double.parseDouble("34.689417"), Double.parseDouble("113.68808")));
-        centerList.add(new NaviLatLng(Double.parseDouble("32.112732"), Double.parseDouble("118.802529")));
-        centerList.add(new NaviLatLng(Double.parseDouble("30.262288"), Double.parseDouble("120.145532")));
-        centerList.add(new NaviLatLng(Double.parseDouble("28.261974"), Double.parseDouble("112.933791")));
-        centerList.add(new NaviLatLng(Double.parseDouble("26.670167"), Double.parseDouble("106.623518")));
-        centerList.add(new NaviLatLng(Double.parseDouble("22.874771"), Double.parseDouble("108.389659")));
-        centerList.add(new NaviLatLng(Double.parseDouble("24.518109"), Double.parseDouble("118.103432")));
-        centerList.add(new NaviLatLng(Double.parseDouble("26.073548"), Double.parseDouble("119.280859")));
-    }
-
-
-    private void setUpMap(AMap aMap) {
-
-
-        //起点位置和  地图界面大小控制
-        aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(list.get(0), 7));
-        aMap.setMapTextZIndex(2);
-        // 绘制一条带有纹理的直线
-        aMap.addPolyline((new PolylineOptions())
-                //手动数据测试
-                //.add(new LatLng(26.57, 106.71),new LatLng(26.14,105.55),new LatLng(26.58, 104.82), new LatLng(30.67, 104.06))
-                //集合数据
-                .addAll(list)
-                //线的宽度
-//                .setUseTexture(true)
-//                .setCustomTexture(BitmapDescriptorFactory.defaultMarker())
-                .width(20).setDottedLine(false).geodesic(true)
-                //颜色
-                .color(Color.argb(255, 96, 208, 117)));
-
-
-
-//        View dotView = LayoutInflater.from(this).inflate(R.layout.gaode_start_marker, mapView, false);
-
-        if (TextUtils.isEmpty(item.get(0).latitude) || TextUtils.isEmpty(item.get(item.size() - 1).latitude)) {
-            return;
-        }
-        LatLonPoint latLonPoint = new LatLonPoint(Double.parseDouble(item.get(0).latitude), Double.parseDouble(item.get(0).longitude));
-
-        //起点图标
-        View markerView = LayoutInflater.from(this).inflate(R.layout.gaode_start_marker, mapView, false);
-        aMap.addMarker(new MarkerOptions()
-                .position(AMapUtil.convertToLatLng(latLonPoint))
-                .icon(BitmapDescriptorFactory.fromView(markerView)));
-
-        //终点坐标
-        View markerEndView = LayoutInflater.from(this).inflate(R.layout.gaode_end_marker, mapView, false);
-
-        LatLonPoint latLonPointEnd = new LatLonPoint(Double.parseDouble(item.get(item.size() - 1).latitude), Double.parseDouble(item.get(item.size() - 1).longitude));
-        aMap.addMarker(new MarkerOptions()
-                .position(AMapUtil.convertToLatLng(latLonPointEnd))
-                .icon(BitmapDescriptorFactory.fromView(markerEndView)));
-    }
-
-
-    /**
-     * 方法必须重写
-     */
-    @Override
-    protected void onResume() {
-        super.onResume();
-        mapView.onResume();
-    }
-
-    /**
-     * 方法必须重写
-     */
-    @Override
-    protected void onPause() {
-        super.onPause();
-        mapView.onPause();
-    }
-
-    /**
-     * 方法必须重写
-     */
-    @Override
-    protected void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-        mapView.onSaveInstanceState(outState);
-    }
-
-    /**
-     * 方法必须重写
-     */
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        mapView.onDestroy();
-    }
-
-    /***
-     *经纬度集合
-     */
-    private List<LatLng> showListLat(List<PositionBean> item) {
-        List<LatLng> points = new ArrayList<LatLng>();
-
-        for (PositionBean ss : item) {
-            if (!TextUtils.isEmpty(ss.latitude) && !TextUtils.isEmpty(ss.longitude)) {
-                Log.e("-shy-", "latitude=: " + ss.latitude + "//longitude=" + ss.longitude);
-                points.add(new LatLng(Double.parseDouble(ss.latitude), Double.parseDouble(ss.longitude)));
-            }
-        }
-        return points;
-    }
-
-
-    public List<LatLng> getshowList(List<NaviLatLng> list) {
-
-        List<LatLng> points = new ArrayList<LatLng>();
-
-        for (NaviLatLng ss : list) {
-            points.add(new LatLng(ss.getLatitude(), ss.getLongitude()));
-        }
-
-        return points;
-
-    }
-
-
-}

+ 0 - 354
gaode/src/main/java/com/quansu/gaode/activity/RouteActivity.java

@@ -1,354 +0,0 @@
-package com.zswc.gaode.activity;
-
-import android.app.ProgressDialog;
-import android.graphics.Color;
-import android.os.Bundle;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import androidx.annotation.Nullable;
-import androidx.appcompat.app.AppCompatActivity;
-
-import com.amap.api.maps.AMap;
-import com.amap.api.maps.CameraUpdateFactory;
-import com.amap.api.maps.MapView;
-import com.amap.api.maps.model.BitmapDescriptorFactory;
-import com.amap.api.maps.model.LatLng;
-import com.amap.api.maps.model.LatLngBounds;
-import com.amap.api.maps.model.Marker;
-import com.amap.api.maps.model.MarkerOptions;
-import com.amap.api.maps.model.PolylineOptions;
-import com.amap.api.services.core.AMapException;
-import com.amap.api.services.core.LatLonPoint;
-import com.amap.api.services.route.BusRouteResult;
-import com.amap.api.services.route.DrivePath;
-import com.amap.api.services.route.DriveRouteResult;
-import com.amap.api.services.route.DriveStep;
-import com.amap.api.services.route.RideRouteResult;
-import com.amap.api.services.route.RouteSearch;
-import com.amap.api.services.route.WalkPath;
-import com.amap.api.services.route.WalkRouteResult;
-import com.githang.statusbar.StatusBarCompat;
-import com.google.gson.Gson;
-import com.zswc.gaode.R;
-import com.zswc.gaode.utils.AMapUtil;
-import com.zswc.gaode.utils.WalkRouteOverlay;
-import com.ysnows.base.model.PositionBean;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Created by shihuiyun
- * on 2020/9/25
- */
-public class RouteActivity extends AppCompatActivity implements AMap.OnMapClickListener,
-        AMap.OnMarkerClickListener, AMap.OnInfoWindowClickListener, AMap.InfoWindowAdapter, RouteSearch.OnRouteSearchListener {
-
-    private AMap aMap;
-    private MapView mapView;
-    private RouteSearch mRouteSearch;
-    private WalkRouteResult mWalkRouteResult;
-    private LatLonPoint mStartPoint;
-    private LatLonPoint mEndPoint;
-    private final int ROUTE_TYPE_DRIVE = 3;
-    private ProgressDialog progDialog = null;// 搜索时进度条
-    private ImageView imgBack;
-    private TextView tvStart;
-    private TextView tvEnd;
-    private LatLng mStartLat;
-    private LatLng mEndLat;
-
-
-    @Override
-    protected void onCreate(@Nullable Bundle bundle) {
-        StatusBarCompat.setStatusBarColor(this, Color.parseColor("#00ffffff"));
-        super.onCreate(bundle);
-        setContentView(R.layout.map_route);
-
-        PositionBean item = new Gson().fromJson(getIntent().getStringExtra("item"), PositionBean.class);
-        imgBack = findViewById(R.id.img_back);
-        tvStart = findViewById(R.id.tv_start);
-        tvEnd = findViewById(R.id.tv_end);
-        tvStart.setText(item.position);
-        tvEnd.setText(item.positionEnd);
-        mapView = (MapView) findViewById(R.id.map);
-        initView();
-
-        if(TextUtils.isEmpty(item.latitude)||TextUtils.isEmpty(item.latitudeEnd)){
-            Toast.makeText(this,"定位失败!",Toast.LENGTH_SHORT).show();
-            return;
-        }
-
-
-        mStartLat = new LatLng(Double.parseDouble(item.latitude), Double.parseDouble(item.longitude));
-        mEndLat = new LatLng(Double.parseDouble(item.latitudeEnd), Double.parseDouble(item.longitudeEnd));
-
-        mStartPoint = new LatLonPoint(Double.parseDouble(item.latitude), Double.parseDouble(item.longitude));//起点
-        mEndPoint = new LatLonPoint(Double.parseDouble(item.latitudeEnd), Double.parseDouble(item.longitudeEnd));//终点
-
-
-        mapView.onCreate(bundle);
-        init();
-        setfromandtoMarker();
-        searchRouteResult(ROUTE_TYPE_DRIVE, RouteSearch.WalkDefault);
-
-
-    }
-
-    /****
-     * 起点终点图标设置
-     */
-    private void setfromandtoMarker() {
-        aMap.addMarker(new MarkerOptions()
-                .position(AMapUtil.convertToLatLng(mStartPoint))
-                .icon(BitmapDescriptorFactory.fromResource(R.drawable.start)));
-        aMap.addMarker(new MarkerOptions()
-                .position(AMapUtil.convertToLatLng(mEndPoint))
-                .icon(BitmapDescriptorFactory.fromResource(R.drawable.end)));
-    }
-
-    /**
-     * 初始化AMap对象
-     */
-    private void init() {
-        if (aMap == null) {
-            aMap = mapView.getMap();
-        }
-        registerListener();
-        mRouteSearch = new RouteSearch(this);
-        mRouteSearch.setRouteSearchListener(this);
-    }
-
-    /**
-     * 注册监听
-     */
-    private void registerListener() {
-        aMap.setOnMapClickListener(RouteActivity.this);
-        aMap.setOnMarkerClickListener(RouteActivity.this);
-        aMap.setOnInfoWindowClickListener(RouteActivity.this);
-        aMap.setInfoWindowAdapter(RouteActivity.this);
-
-    }
-
-    @Override
-    public View getInfoContents(Marker arg0) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public View getInfoWindow(Marker arg0) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public void onInfoWindowClick(Marker arg0) {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public boolean onMarkerClick(Marker arg0) {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    @Override
-    public void onMapClick(LatLng arg0) {
-        // TODO Auto-generated method stub
-
-    }
-
-    /**
-     * 开始搜索路线规划方案
-     */
-    public void searchRouteResult(int routeType, int mode) {
-        if (mStartPoint == null) {
-            Toast.makeText(RouteActivity.this, "起点未设置", Toast.LENGTH_LONG).show();
-            return;
-        }
-        if (mEndPoint == null) {
-            Toast.makeText(RouteActivity.this, "终点未设置", Toast.LENGTH_LONG).show();
-        }
-        showProgressDialog();
-        final RouteSearch.FromAndTo fromAndTo = new RouteSearch.FromAndTo(
-                mStartPoint, mEndPoint);
-        if (routeType == ROUTE_TYPE_DRIVE) {
-
-            RouteSearch.DriveRouteQuery query = new RouteSearch.DriveRouteQuery(fromAndTo, RouteSearch.DRIVING_SINGLE_DEFAULT, null, null, "");
-            mRouteSearch.calculateDriveRouteAsyn(query);
-
-//            RouteSearch.WalkRouteQuery query = new RouteSearch.WalkRouteQuery(fromAndTo, mode);//步行
-//            mRouteSearch.calculateWalkRouteAsyn(query);
-        }
-    }
-
-    @Override
-    public void onBusRouteSearched(BusRouteResult result, int errorCode) {
-
-    }
-
-    @Override
-    public void onDriveRouteSearched(DriveRouteResult driveRouteResult, int rCode) {
-
-        if (rCode == 1000) {//获取规划路线成功,获取到的是了,路线坐标点的集合
-            dissmissProgressDialog();
-            List<DrivePath> paths = driveRouteResult.getPaths();
-
-            //创建存储坐标点的集合
-            List<LatLng> latLngs = new ArrayList<>();
-
-            //遍历获取规划的所有路线坐标点
-            for (DrivePath mDrivePath : paths) {
-                for (DriveStep mDriveStep : mDrivePath.getSteps()) {
-                    for (LatLonPoint mLatLonPoint : mDriveStep.getPolyline()) {
-                        latLngs.add(new
-                                LatLng(mLatLonPoint.getLatitude(), mLatLonPoint.getLongitude()));
-                    }
-                }
-            }
-
-            //先清除一下,避免重复显示
-            aMap.clear();
-
-            //绘制起始位置和目的地marker
-            aMap.addMarker(new MarkerOptions()
-                    .icon(BitmapDescriptorFactory.fromResource(R.drawable.amap_start))
-                    .position(mStartLat));
-            aMap.addMarker(new MarkerOptions()
-                    .icon(BitmapDescriptorFactory.fromResource(R.drawable.amap_end))
-                    .position(mEndLat));
-
-            //绘制规划路径路线
-            aMap.addPolyline(new PolylineOptions()
-                    //路线坐标点的集合
-                    .addAll(latLngs)
-                    //线的宽度
-                    .width(30)
-                    .color(getResources().getColor(R.color.refresh_colorPrimaryDark)));
-            //设置画线的颜色
-
-            //显示完整包含所有marker地图路线
-            LatLngBounds.Builder builder = new LatLngBounds.Builder();
-            for (int i = 0; i < latLngs.size(); i++) {
-                builder.include(latLngs.get(i));
-            }
-            //显示全部marker,第二个参数是四周留空宽度
-            aMap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), 200));
-        }
-
-    }
-
-    @Override
-    public void onWalkRouteSearched(WalkRouteResult result, int errorCode) {
-        dissmissProgressDialog();
-        aMap.clear();// 清理地图上的所有覆盖物
-        if (errorCode == AMapException.CODE_AMAP_SUCCESS) {
-            if (result != null && result.getPaths() != null) {
-                if (result.getPaths().size() > 0) {
-                    mWalkRouteResult = result;
-                    final WalkPath walkPath = mWalkRouteResult.getPaths()
-                            .get(0);
-                    WalkRouteOverlay walkRouteOverlay = new WalkRouteOverlay(
-                            this, aMap, walkPath,
-                            mWalkRouteResult.getStartPos(),
-                            mWalkRouteResult.getTargetPos());
-                    walkRouteOverlay.getWalkColor();//轨迹颜色修改
-                    walkRouteOverlay.removeFromMap();
-                    walkRouteOverlay.addToMap();
-                    walkRouteOverlay.zoomToSpan();
-                    walkRouteOverlay.setNodeIconVisibility(false);//关闭行走图标轨迹
-                    int dis = (int) walkPath.getDistance();
-                    int dur = (int) walkPath.getDuration();
-                    String des = AMapUtil.getFriendlyTime(dur) + "(" + AMapUtil.getFriendlyLength(dis) + ")";
-                } else if (result != null && result.getPaths() == null) {
-                    Toast.makeText(RouteActivity.this, R.string.no_result, Toast.LENGTH_LONG).show();
-                }
-            } else {
-                Toast.makeText(RouteActivity.this, R.string.no_result, Toast.LENGTH_LONG).show();
-            }
-        } else {
-
-            Log.e("-shy-", "errorCode=: " + errorCode);
-            Toast.makeText(RouteActivity.this, errorCode, Toast.LENGTH_LONG).show();
-        }
-    }
-
-
-    /**
-     * 显示进度框
-     */
-    private void showProgressDialog() {
-        if (progDialog == null)
-            progDialog = new ProgressDialog(this);
-        progDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
-        progDialog.setIndeterminate(false);
-        progDialog.setCancelable(true);
-        progDialog.setMessage("正在搜索");
-        progDialog.show();
-    }
-
-    /**
-     * 隐藏进度框
-     */
-    private void dissmissProgressDialog() {
-        if (progDialog != null) {
-            progDialog.dismiss();
-        }
-    }
-
-    /**
-     * 方法必须重写
-     */
-    @Override
-    protected void onResume() {
-        super.onResume();
-        mapView.onResume();
-    }
-
-    /**
-     * 方法必须重写
-     */
-    @Override
-    protected void onPause() {
-        super.onPause();
-        mapView.onPause();
-    }
-
-    /**
-     * 方法必须重写
-     */
-    @Override
-    protected void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-        mapView.onSaveInstanceState(outState);
-    }
-
-    /**
-     * 方法必须重写
-     */
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        mapView.onDestroy();
-    }
-
-    @Override
-    public void onRideRouteSearched(RideRouteResult arg0, int arg1) {
-        // TODO Auto-generated method stub
-
-    }
-
-    private void initView() {
-        imgBack.setOnClickListener(v -> {
-            finish();
-        });
-    }
-
-}

+ 0 - 243
gaode/src/main/java/com/quansu/gaode/activity/SearchAddressActivity.java

@@ -1,243 +0,0 @@
-package com.zswc.gaode.activity;
-
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.Color;
-import android.os.Bundle;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.inputmethod.EditorInfo;
-import android.view.inputmethod.InputMethodManager;
-import android.widget.AdapterView;
-import android.widget.EditText;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import androidx.appcompat.app.AppCompatActivity;
-
-import com.amap.api.services.core.AMapException;
-import com.amap.api.services.core.PoiItem;
-import com.amap.api.services.poisearch.PoiResult;
-import com.amap.api.services.poisearch.PoiSearch;
-import com.githang.statusbar.StatusBarCompat;
-import com.jaeger.library.StatusBarUtil;
-import com.zswc.gaode.R;
-import com.zswc.gaode.adapter.PoiAdapter;
-import com.zswc.gaode.bean.PoiBean;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * poi关键字搜索
- * Created by yufs on 2017/3/1.
- */
-
-public class SearchAddressActivity extends AppCompatActivity implements PoiSearch.OnPoiSearchListener, AutoListView.OnRefreshListener, AutoListView.OnLoadListener {
-    EditText et_search;
-    ImageView tv_title_back;
-    TextView tv_title_right;
-    LinearLayout ll_loading;
-    AutoListView lv_list;
-    TextView tv_no_data;
-    private ImageView ivDelete;
-    private int currentPage = 0;
-    private PoiSearch.Query query;// Poi查询条件类
-    private PoiSearch poiSearch;// POI搜索
-
-    private List<PoiBean> poiData = new ArrayList<>();
-    private List<PoiItem> savePoiItem = new ArrayList<>();
-    private PoiAdapter mAdapter;
-    private String mKeyWord;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setStatusBar();
-        setContentView(R.layout.activity_search_address);
-        initView();
-        setListener();
-
-    }
-
-    protected void setStatusBar() {
-        StatusBarUtil.setDarkMode(this);
-        StatusBarUtil.setColor(this, getResources().getColor(R.color.colorPrimary), 1);
-        StatusBarCompat.setStatusBarColor(this, Color.parseColor("#00ffffff"));
-
-    }
-
-    private void initView() {
-        et_search = (EditText) findViewById(R.id.et_search);
-        tv_title_back = (ImageView) findViewById(R.id.tv_title_back);
-        ll_loading = (LinearLayout) findViewById(R.id.ll_loading);
-        lv_list = (AutoListView) findViewById(R.id.lv_list);
-        tv_no_data = (TextView) findViewById(R.id.tv_no_data);
-        tv_title_right = (TextView) findViewById(R.id.tv_title_right);
-        ivDelete = findViewById(R.id.iv_delete);
-
-    }
-
-    private void setListener() {
-        mAdapter = new PoiAdapter(this, poiData);
-        lv_list.setAdapter(mAdapter);
-        lv_list.setOnRefreshListener(this);
-        lv_list.setOnLoadListener(this);
-        lv_list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                PoiItem poiItem = savePoiItem.get(position-1);
-                PoiBean  poiBean= poiData.get(position-1);
-                Intent intent = new Intent();
-                intent.putExtra("poiItem", poiItem);
-                intent.putExtra("name", poiBean.getTitleName());
-                setResult(6, intent);
-                finish();
-            }
-        });
-
-        tv_title_right.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                search();
-            }
-        });
-
-        tv_title_back.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                finish();
-            }
-        });
-        ivDelete.setOnClickListener(v -> {
-            et_search.setText("");
-        });
-        et_search.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-
-                if (actionId == EditorInfo.IME_ACTION_DONE) {
-
-                    search();
-                    return true;
-                }
-
-                return false;
-            }
-        });
-
-    }
-
-
-    public void search() {
-        mKeyWord = et_search.getText().toString();
-        if (TextUtils.isEmpty(mKeyWord)) {
-            Toast.makeText(this, "请输入您要查找的地点", Toast.LENGTH_SHORT).show();
-            return;
-        }
-        hideSoftKey(et_search);
-
-        savePoiItem.clear();
-        poiData.clear();
-        currentPage = 0;
-        doSearchQuery(mKeyWord);
-
-    }
-
-    private void hideSoftKey(View view) {
-        InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
-        imm.showSoftInput(view, InputMethodManager.SHOW_FORCED);
-        imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
-    }
-
-    protected void doSearchQuery(String keyWord) {
-        if (currentPage == 0) {
-            savePoiItem.clear();
-            poiData.clear();
-            mAdapter.notifyDataSetChanged();
-            ll_loading.setVisibility(View.VISIBLE);// 显示进度框
-            lv_list.setVisibility(View.GONE);
-        }
-        query = new PoiSearch.Query(keyWord, "", "");// 第一个参数表示搜索字符串,第二个参数表示poi搜索类型,第三个参数表示poi搜索区域(空字符串代表全国)
-        query.setPageSize(10);// 设置每页最多返回多少条poiitem
-        query.setPageNum(currentPage);// 设置查第一页
-        query.setCityLimit(true);
-        poiSearch = new PoiSearch(this, query);
-        poiSearch.setOnPoiSearchListener(this);
-        poiSearch.searchPOIAsyn();
-    }
-
-    @Override
-    public void onPoiSearched(PoiResult poiResult, int rCode) {
-        lv_list.onLoadComplete();
-
-        if (rCode == AMapException.CODE_AMAP_SUCCESS) {
-            if (poiResult != null && poiResult.getQuery() != null) {// 搜索poi的结果
-
-                if (poiResult.getQuery().equals(query)) {// 是否是同一条
-                    if (currentPage == 0) {
-                        ll_loading.setVisibility(View.GONE);// 隐藏对话框
-                        lv_list.setVisibility(View.VISIBLE);
-                        tv_no_data.setVisibility(View.GONE);
-                    }
-                    // 取得搜索到的poiitems有多少页
-                    List<PoiItem> poiItems = poiResult.getPois();// 取得第一页的poiitem数据,页数从数字0开始
-                    savePoiItem.addAll(poiItems);
-                    List<PoiBean> tem = new ArrayList<>();
-                    if (poiItems != null && poiItems.size() > 0) {
-                        for (int i = 0; i < poiItems.size(); i++) {
-                            PoiItem poiItem = poiItems.get(i);
-                            PoiBean bean = new PoiBean();
-                            bean.setTitleName(poiItem.getTitle());
-                            bean.setCityName(poiItem.getCityName());
-                            bean.setAd(poiItem.getAdName());
-                            bean.setSnippet(poiItem.getSnippet());
-                            bean.setPoint(poiItem.getLatLonPoint());
-                            Log.e("yufs", "" + poiItem.getTitle() + "," + poiItem.getProvinceName() + ","
-                                    + poiItem.getCityName() + ","
-                                    + poiItem.getAdName() + ","//区
-                                    + poiItem.getSnippet() + ","
-                                    + poiItem.getLatLonPoint() + "\n");
-                            tem.add(bean);
-                        }
-                    }
-                    poiData.addAll(tem);
-                    mAdapter.notifyDataSetChanged();
-                } else {
-                    //没有结果
-                    ll_loading.setVisibility(View.GONE);// 隐藏对话框
-                    lv_list.setVisibility(View.GONE);
-                    tv_no_data.setVisibility(View.VISIBLE);
-                }
-            } else {
-                Toast.makeText(this, "搜索失败:" + rCode, Toast.LENGTH_SHORT).show();
-            }
-
-
-        }
-    }
-
-
-    @Override
-    public void onPoiItemSearched(PoiItem poiItem, int i) {
-
-    }
-
-    //刷新
-    @Override
-    public void onRefresh() {
-        lv_list.onRefreshComplete();
-    }
-
-    //加载下一页数据
-    @Override
-    public void onLoad() {
-        currentPage++;
-        doSearchQuery(mKeyWord);
-    }
-}

+ 0 - 63
gaode/src/main/java/com/quansu/gaode/adapter/PoiAdapter.java

@@ -1,63 +0,0 @@
-package com.zswc.gaode.adapter;
-
-import android.content.Context;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.zswc.gaode.R;
-import com.zswc.gaode.bean.PoiBean;
-
-import java.util.List;
-
-/**
- * Created by yufs on 2017/3/1.
- */
-
-public class PoiAdapter extends BaseAdapter {
-    List<PoiBean> data;
-    Context context;
-    public PoiAdapter(Context context, List<PoiBean> data) {
-        this.context=context;
-        this.data=data;
-    }
-
-    @Override
-    public int getCount() {
-        return data.size();
-    }
-
-    @Override
-    public Object getItem(int position) {
-        return data.get(position);
-    }
-
-    @Override
-    public long getItemId(int position) {
-        return position;
-    }
-
-    @Override
-    public View getView(int position, View convertView, ViewGroup parent) {
-        convertView= View.inflate(context, R.layout.item_select_address,null);
-        TextView tv_title=ViewHolder.get(convertView,R.id.tv_title);
-        TextView tv_address=ViewHolder.get(convertView,R.id.tv_address);
-        ImageView iv_checked=ViewHolder.get(convertView,R.id.iv_checked);
-        PoiBean item= data.get(position);
-        if(item.isSelected()){
-            iv_checked.setVisibility(View.VISIBLE);
-        }else{
-            iv_checked.setVisibility(View.INVISIBLE);
-        }
-        if(item.isLoc()){
-            tv_address.setVisibility(View.GONE);
-        }else{
-            tv_address.setVisibility(View.VISIBLE);
-        }
-        tv_title.setText(item.getTitleName());
-        tv_address.setText(item.getCityName()+item.getAd()+item.getSnippet());
-        return convertView;
-    }
-}

+ 0 - 117
gaode/src/main/java/com/quansu/gaode/adapter/SearchResultAdapter.java

@@ -1,117 +0,0 @@
-package com.zswc.gaode.adapter;
-
-import android.content.Context;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.amap.api.services.core.PoiItem;
-import com.zswc.gaode.R;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 包名: com.amap.searchdemo
- * <p>
- * 创建时间:2016/10/19
- * 项目名称:SearchDemo
- *
- * @author guibao.ggb
- * @email guibao.ggb@alibaba-inc.com
- * <p>
- * 类说明:
- */
-public class SearchResultAdapter extends BaseAdapter {
-
-    private List<PoiItem> data;
-    private Context context;
-
-    private int selectedPosition = 0;
-
-    public SearchResultAdapter(Context context) {
-        this.context = context;
-        data = new ArrayList<>();
-    }
-
-    public void setData(List<PoiItem> data) {
-        this.data = data;
-    }
-
-    public void setSelectedPosition(int selectedPosition) {
-        this.selectedPosition = selectedPosition;
-    }
-
-    public int getSelectedPosition() {
-        return selectedPosition;
-    }
-
-    @Override
-    public int getCount() {
-        return data.size();
-    }
-
-    @Override
-    public Object getItem(int position) {
-        return data.get(position);
-    }
-
-    @Override
-    public long getItemId(int position) {
-        return position;
-    }
-
-    @Override
-    public View getView(int position, View convertView, ViewGroup parent) {
-        ViewHolder viewHolder;
-        if (convertView == null) {
-            LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-            convertView = inflater.inflate(R.layout.view_holder_result, parent, false);
-
-            viewHolder = new ViewHolder(convertView);
-
-            convertView.setTag(viewHolder);
-
-        } else {
-            viewHolder = (ViewHolder) convertView.getTag();
-        }
-
-        viewHolder.bindView(position);
-
-        return convertView;
-    }
-
-
-    class ViewHolder {
-        TextView textTitle;
-        TextView textSubTitle;
-        ImageView imageCheck;
-
-        public ViewHolder(View view) {
-            textTitle = (TextView) view.findViewById(R.id.text_title);
-            textSubTitle = (TextView) view.findViewById(R.id.text_title_sub);
-            imageCheck = (ImageView) view.findViewById(R.id.image_check);
-        }
-
-        public void bindView(int position) {
-            if (position >= data.size())
-                return;
-
-            PoiItem poiItem = data.get(position);
-
-            textTitle.setText(poiItem.getTitle());
-            textSubTitle.setText(poiItem.getProvinceName()+poiItem.getCityName() + poiItem.getAdName() + poiItem.getSnippet());
-
-
-
-            imageCheck.setVisibility(position == selectedPosition ? View.VISIBLE : View.INVISIBLE);
-            textSubTitle.setVisibility((position == 0 && poiItem.getPoiId().equals("regeo")) ? View.GONE : View.VISIBLE);
-
-
-        }
-    }
-}

+ 0 - 20
gaode/src/main/java/com/quansu/gaode/adapter/ViewHolder.java

@@ -1,20 +0,0 @@
-package com.zswc.gaode.adapter;
-
-import android.util.SparseArray;
-import android.view.View;
-
-public class ViewHolder {
-	 public static <T extends View> T get(View view, int id) {
-	        SparseArray<View> viewHolder = (SparseArray<View>) view.getTag();
-	        if (viewHolder == null) {
-	            viewHolder = new SparseArray<View>();
-	            view.setTag(viewHolder);
-	        }
-	        View childView = viewHolder.get(id);
-	        if (childView == null) {
-	            childView = view.findViewById(id);
-	            viewHolder.put(id, childView);
-	        }
-	        return (T) childView;
-	    }
-}

+ 0 - 92
gaode/src/main/java/com/quansu/gaode/bean/PoiBean.java

@@ -1,92 +0,0 @@
-package com.zswc.gaode.bean;
-
-import com.amap.api.services.core.LatLonPoint;
-
-/**
- * 地图搜索周边bean
- * Created by yufs on 2017/3/1.
- */
-
-public class PoiBean {
-    String titleName;
-    String province;//省 p
-    String cityName;//市 q
-    String ad;//区
-    String snippet;//详细地址
-    boolean selected;//是否选中当前
-    LatLonPoint point;//经纬度对象
-    boolean loc;//当前地址为定位得到,非搜索周边得到
-    String locAddress;//定位得到详细地址
-
-    public String getLocAddress() {
-        return locAddress;
-    }
-
-    public void setLocAddress(String locAddress) {
-        this.locAddress = locAddress;
-    }
-
-    public boolean isLoc() {
-        return loc;
-    }
-
-    public void setLoc(boolean loc) {
-        this.loc = loc;
-    }
-
-    public LatLonPoint getPoint() {
-        return point;
-    }
-
-    public void setPoint(LatLonPoint point) {
-        this.point = point;
-    }
-
-    public boolean isSelected() {
-        return selected;
-    }
-
-    public void setSelected(boolean selected) {
-        this.selected = selected;
-    }
-
-    public String getTitleName() {
-        return titleName;
-    }
-
-    public void setTitleName(String titleName) {
-        this.titleName = titleName;
-    }
-
-    public String getAd() {
-        return ad;
-    }
-
-    public void setAd(String ad) {
-        this.ad = ad;
-    }
-
-    public String getProvince() {
-        return province;
-    }
-
-    public void setProvince(String province) {
-        this.province = province;
-    }
-
-    public String getCityName() {
-        return cityName;
-    }
-
-    public void setCityName(String cityName) {
-        this.cityName = cityName;
-    }
-
-    public String getSnippet() {
-        return snippet;
-    }
-
-    public void setSnippet(String snippet) {
-        this.snippet = snippet;
-    }
-}

+ 0 - 172
gaode/src/main/java/com/quansu/gaode/componnent/CpGaode.java

@@ -1,172 +0,0 @@
-package com.zswc.gaode.componnent;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.util.Log;
-import com.billy.cc.core.component.CC;
-import com.billy.cc.core.component.CCResult;
-import com.billy.cc.core.component.IComponent;
-import com.google.gson.Gson;
-import com.hdgq.locationlib.entity.ShippingNoteInfo;
-import com.zswc.gaode.activity.GaodeActivity;
-import com.zswc.gaode.activity.PolylineActivity;
-import com.zswc.gaode.activity.RouteActivity;
-import com.zswc.gaode.utils.CurrentLocationUtils;
-import com.zswc.gaode.utils.LocationUtils;
-import com.ysnows.base.base.BApp;
-import com.ysnows.base.ccextension.BIComponent;
-import com.ysnows.base.model.PositionBean;
-
-import java.util.ArrayList;
-
-
-public class CpGaode extends BIComponent implements IComponent {
-    /**
-     * 选择位置
-     *
-     * @return
-     */
-    public boolean selectLocation(CC cc,String city,String address) {
-
-
-        Intent intent = new Intent(BApp.instance().getApplicationContext(), GaodeActivity.class);
-        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
-        Bundle bundle=new Bundle();
-        bundle.putString("city",city);
-        bundle.putString("address",address);
-        intent.putExtras(bundle);
-        BApp.instance().getApplicationContext().startActivity(intent);
-
-        // UiSwitch.single(BaseApp.getInstance().getApplicationContext(), com.quansu.gaode.activity.GaodeActivity.class);
-
-
-        CC.sendCCResult(cc.getCallId(), CCResult.success());
-
-        return false;
-    }
-    /**
-     * 获取当前位置
-     *
-     * @param cc
-     *
-     * @return
-     */
-    public boolean currentLocation(CC cc){
-
-        new CurrentLocationUtils().getStart(cc.getContext());
-
-        CC.sendCCResult(cc.getCallId(), CCResult.success());
-        return false;
-    }
-    /**
-     * 两点轨迹
-     *
-     * @param cc
-     * @return
-     */
-
-    public boolean goRouteLocation(CC cc,PositionBean item){
-
-
-        Intent intent = new Intent(BApp.instance().getApplicationContext(), RouteActivity.class);
-        intent.putExtra("item",new Gson().toJson(item));
-        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
-        BApp.instance().getApplicationContext().startActivity(intent);
-
-        CC.sendCCResult(cc.getCallId(), CCResult.success());
-        return false;
-    }
-    /**
-     * 多点轨迹
-     *brand:车票号
-     * @param cc
-     * @return
-     */
-    public boolean goPolyline(CC cc, ArrayList<PositionBean> item){
-
-        Intent intent = new Intent(BApp.instance().getApplicationContext(), PolylineActivity.class);
-        intent.putExtra("item",new Gson().toJson(item));
-        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
-        BApp.instance().getApplicationContext().startActivity(intent);
-        CC.sendCCResult(cc.getCallId(), CCResult.success());
-        return false;
-
-
-    }
-
-    public boolean setNotification(CC cc){
-        LocationUtils.setNotification();
-        CC.sendCCResult(cc.getCallId(), CCResult.success());
-        return false;
-    }
-
-
-    public boolean initLocationSdk(CC cc){
-
-        LocationUtils.initLoacation(cc.getContext());
-
-        CC.sendCCResult(cc.getCallId(), CCResult.success());
-        return false;
-
-    }
-
-
-    /**
-     * 启用定位
-     * @param cc
-     * @param shippingNoteNumber
-     * @param startCountrySubdivisionCode
-     * @param endCountrySubdivisionCode
-     * @return
-     */
-    public boolean loacationStart(CC cc,
-                                  String shippingNoteNumber,
-                                  String startCountrySubdivisionCode,
-                                  String endCountrySubdivisionCode){
-
-        ShippingNoteInfo info=new ShippingNoteInfo();
-        info.setShippingNoteNumber(shippingNoteNumber);
-        info.setSerialNumber(shippingNoteNumber+"1");
-        info.setStartCountrySubdivisionCode(startCountrySubdivisionCode);
-        info.setEndCountrySubdivisionCode(endCountrySubdivisionCode);
-
-        ShippingNoteInfo[] shippingNoteInfos = {info};
-
-        LocationUtils.loacationStart(cc.getContext(),shippingNoteInfos);
-
-        CC.sendCCResult(cc.getCallId(), CCResult.success());
-        return false;
-
-    }
-
-    /**
-     * 结束定位
-     * @param cc
-     * @param shippingNoteNumber
-     * @param startCountrySubdivisionCode
-     * @param endCountrySubdivisionCode
-     * @return
-     */
-    public boolean loacationStop(CC cc,
-                                 String shippingNoteNumber,
-                                 String startCountrySubdivisionCode,
-                                 String endCountrySubdivisionCode){
-
-        ShippingNoteInfo info=new ShippingNoteInfo();
-        info.setShippingNoteNumber(shippingNoteNumber);
-        info.setSerialNumber(shippingNoteNumber+"1");
-        info.setStartCountrySubdivisionCode(startCountrySubdivisionCode);
-        info.setEndCountrySubdivisionCode(endCountrySubdivisionCode);
-
-        ShippingNoteInfo[] shippingNoteInfos = {info};
-
-        LocationUtils.loacationStop(cc.getContext(),shippingNoteInfos);
-        CC.sendCCResult(cc.getCallId(), CCResult.success());
-        return false;
-
-    }
-
-}
-
-
-

+ 0 - 57
gaode/src/main/java/com/quansu/gaode/utils/AMapServicesUtil.java

@@ -1,57 +0,0 @@
-package com.zswc.gaode.utils;
-
-/**
- * 
- */
-
-import android.graphics.Bitmap;
-
-import com.amap.api.maps.model.LatLng;
-import com.amap.api.services.core.LatLonPoint;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-class AMapServicesUtil {
-	public static int BUFFER_SIZE = 2048;
-
-	public static byte[] inputStreamToByte(InputStream in) throws IOException {
-
-		ByteArrayOutputStream outStream = new ByteArrayOutputStream();
-		byte[] data = new byte[BUFFER_SIZE];
-		int count = -1;
-		while ((count = in.read(data, 0, BUFFER_SIZE)) != -1)
-			outStream.write(data, 0, count);
-
-		data = null;
-		return outStream.toByteArray();
-	}
-	public static LatLonPoint convertToLatLonPoint(LatLng latlon) {
-		return new LatLonPoint(latlon.latitude, latlon.longitude);
-	}
-	public static LatLng convertToLatLng(LatLonPoint latLonPoint) {
-		return new LatLng(latLonPoint.getLatitude(), latLonPoint.getLongitude());
-	}
-	public static ArrayList<LatLng> convertArrList(List<LatLonPoint> shapes) {
-		ArrayList<LatLng> lineShapes = new ArrayList<LatLng>();
-		for (LatLonPoint point : shapes) {
-			LatLng latLngTemp = AMapServicesUtil.convertToLatLng(point);
-			lineShapes.add(latLngTemp);
-		}
-		return lineShapes;
-	}
-	public static Bitmap zoomBitmap(Bitmap bitmap, float res) {
-		if (bitmap == null) {
-			return null;
-		}
-		int width, height;
-		width = (int) (bitmap.getWidth() * res);
-		height = (int) (bitmap.getHeight() * res);
-		Bitmap newbmp = Bitmap.createScaledBitmap(bitmap, width, height, true);
-		return newbmp;
-	}
-
-}

+ 0 - 151
gaode/src/main/java/com/quansu/gaode/utils/AMapUtil.java

@@ -1,151 +0,0 @@
-package com.zswc.gaode.utils;
-
-import com.amap.api.maps.model.LatLng;
-import com.amap.api.services.core.LatLonPoint;
-import com.amap.api.services.route.BusPath;
-import com.amap.api.services.route.BusStep;
-import com.amap.api.services.route.RouteBusLineItem;
-import com.amap.api.services.route.RouteRailwayItem;
-
-import java.text.DecimalFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-public class AMapUtil {
-
-    public static String getFriendlyLength(int lenMeter) {
-        if (lenMeter > 10000) // 10 km
-        {
-            int dis = lenMeter / 1000;
-            return dis + "";
-        }
-
-        if (lenMeter > 1000) {
-            float dis = (float) lenMeter / 1000;
-            DecimalFormat fnum = new DecimalFormat("##0.0");
-            String dstr = fnum.format(dis);
-            return dstr;
-        }
-
-        if (lenMeter > 100) {
-            int dis = lenMeter / 50 * 50;
-            return dis + "";
-        }
-
-        int dis = lenMeter / 10 * 10;
-        if (dis == 0) {
-            dis = 10;
-        }
-
-        return dis + "";
-    }
-
-    public static boolean IsEmptyOrNullString(String s) {
-        return (s == null) || (s.trim().length() == 0);
-    }
-
-    /**
-     * 把LatLng对象转化为LatLonPoint对象
-     */
-    public static LatLonPoint convertToLatLonPoint(LatLng latlon) {
-        return new LatLonPoint(latlon.latitude, latlon.longitude);
-    }
-
-    /**
-     * 把LatLonPoint对象转化为LatLon对象
-     */
-    public static LatLng convertToLatLng(LatLonPoint latLonPoint) {
-        return new LatLng(latLonPoint.getLatitude(), latLonPoint.getLongitude());
-    }
-
-    /**
-     * 把集合体的LatLonPoint转化为集合体的LatLng
-     */
-    public static ArrayList<LatLng> convertArrList(List<LatLonPoint> shapes) {
-        ArrayList<LatLng> lineShapes = new ArrayList<LatLng>();
-        for (LatLonPoint point : shapes) {
-            LatLng latLngTemp = AMapUtil.convertToLatLng(point);
-            lineShapes.add(latLngTemp);
-        }
-        return lineShapes;
-    }
-
-    /**
-     * long类型时间格式化
-     */
-    public static String convertToTime(long time) {
-        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        Date date = new Date(time);
-        return df.format(date);
-    }
-
-    public static final String HtmlBlack = "#000000";
-    public static final String HtmlGray = "#808080";
-
-    public static String getFriendlyTime(int second) {
-        if (second > 3600) {
-            int hour = second / 3600;
-            int miniate = (second % 3600) / 60;
-            return hour + "小时" + miniate + "分钟";
-        }
-        if (second >= 60) {
-            int miniate = second / 60;
-            return miniate + "分钟";
-        }
-        return second + "秒";
-    }
-
-
-    public static String getBusPathTitle(BusPath busPath) {
-        if (busPath == null) {
-            return String.valueOf("");
-        }
-        List<BusStep> busSetps = busPath.getSteps();
-        if (busSetps == null) {
-            return String.valueOf("");
-        }
-        StringBuffer sb = new StringBuffer();
-        for (BusStep busStep : busSetps) {
-            if (busStep.getBusLines().size() > 0) {
-                RouteBusLineItem busline = busStep.getBusLines().get(0);
-                if (busline == null) {
-                    continue;
-                }
-                String buslineName = getSimpleBusLineName(busline.getBusLineName());
-                sb.append(buslineName);
-                sb.append(" > ");
-            }
-            if (busStep.getRailway() != null) {
-                RouteRailwayItem railway = busStep.getRailway();
-                sb.append(railway.getTrip() + "(" + railway.getDeparturestop().getName()
-                        + " - " + railway.getArrivalstop().getName() + ")");
-                sb.append(" > ");
-            }
-        }
-        return sb.substring(0, sb.length() - 3);
-    }
-
-    public static String getBusPathDes(BusPath busPath) {
-        if (busPath == null) {
-            return String.valueOf("");
-        }
-        long second = busPath.getDuration();
-        String time = getFriendlyTime((int) second);
-        float subDistance = busPath.getDistance();
-        String subDis = getFriendlyLength((int) subDistance);
-        float walkDistance = busPath.getWalkDistance();
-        String walkDis = getFriendlyLength((int) walkDistance);
-        return String.valueOf(time + " | " + subDis + " | 步行" + walkDis);
-    }
-
-    public static String getSimpleBusLineName(String busLineName) {
-        if (busLineName == null) {
-            return String.valueOf("");
-        }
-        return busLineName.replaceAll("\\(.*?\\)", "");
-    }
-
-
-}

+ 0 - 135
gaode/src/main/java/com/quansu/gaode/utils/CurrentLocationUtils.java

@@ -1,135 +0,0 @@
-package com.zswc.gaode.utils;
-
-import android.content.Context;
-import android.util.Log;
-
-import com.amap.api.location.AMapLocation;
-import com.amap.api.location.AMapLocationClient;
-import com.amap.api.location.AMapLocationClientOption;
-import com.amap.api.location.AMapLocationListener;
-import com.yanzhenjie.permission.Action;
-import com.yanzhenjie.permission.AndPermission;
-import com.yanzhenjie.permission.runtime.Permission;
-import com.ysnows.base.ccretrofit.CCRetrofit;
-import com.ysnows.base.model.PositionBean;
-import com.ysnows.base.route.IApp;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-
-/**
- * Created by shihuiyun
- * on 2020/6/4
- */
-public class CurrentLocationUtils {
-
-    public void getStart(Context context){
-        AndPermission.with(context)
-                .runtime()
-                .permission(Permission.ACCESS_COARSE_LOCATION,
-                        Permission.READ_EXTERNAL_STORAGE,
-                        Permission.WRITE_EXTERNAL_STORAGE
-                )
-                .onGranted(new Action<List<String>>() {
-                               /**
-                                * @param data
-                                */
-                               @Override
-                               public void onAction(List<String> data) {
-                                   getCurrentLocation(context);
-                               }
-                           }
-                )
-                .start();
-    }
-
-
-
-    /**
-     * 获取当前位置
-     */
-    AMapLocationClient mLocationClient = null;
-    public AMapLocationClientOption mLocationOption = null;
-
-    private void getCurrentLocation(Context context) {
-
-        //初始化定位
-        mLocationClient = new AMapLocationClient(context);
-        //设置定位回调监听
-        mLocationClient.setLocationListener(mLocationListener);
-        //初始化定位参数
-        mLocationOption = new AMapLocationClientOption();
-        // 同时使用网络定位和GPS定位,优先返回最高精度的定位结果,以及对应的地址描述信息
-        mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy);
-        //只会使用网络定位
-        /* mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Battery_Saving);*/
-        //只使用GPS进行定位
-        /*mLocationOption.setLocationMode(AMapLocationMode.Device_Sensors);*/
-        // 设置为单次定位 默认为false
-        mLocationOption.setOnceLocation(true);
-        //设置定位间隔,单位毫秒,默认为2000ms,最低1000ms。默认连续定位 切最低时间间隔为1000ms
-        mLocationOption.setInterval(3500);
-        mLocationClient.setLocationOption(mLocationOption);
-        //启动定位
-        mLocationClient.startLocation();
-
-    }
-
-    public AMapLocationListener mLocationListener = new AMapLocationListener() {
-        @Override
-        public void onLocationChanged(AMapLocation amapLocation) {
-
-            if (amapLocation != null) {
-                if (amapLocation.getErrorCode() == 0) {
-                    //定位成功回调信息,设置相关消息
-                    amapLocation.getLocationType();//获取当前定位结果来源,如网络定位结果,详见定位类型表
-                    amapLocation.getLatitude();//获取纬度
-                    amapLocation.getLongitude();//获取经度
-                    amapLocation.getAccuracy();//获取精度信息
-                    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-                    Date date = new Date(amapLocation.getTime());
-                    df.format(date);//定位时间
-                    amapLocation.getAddress();//地址,如果option中设置isNeedAddress为false,则没有此结果,网络定位结果中会有地址信息,GPS定位不返回地址信息。
-//                    amapLocation.getCountry();//国家信息
-//                    amapLocation.getProvince();//省信息
-//                    amapLocation.getCity();//城市信息
-//                    amapLocation.getDistrict();//城区信息
-//                    amapLocation.getStreet();//街道信息
-//                    amapLocation.getStreetNum();//街道门牌号信息
-//                    amapLocation.getCityCode();//城市编码
-//                    amapLocation.getAdCode();//地区编码
-                    Log.e("AmapError", "amapLocation.getAddress()="+amapLocation.getAddress());
-
-                    String address =amapLocation.getProvince() +
-                            amapLocation.getCity() +
-                            amapLocation.getDistrict() +
-                            amapLocation.getStreet();
-
-                    PositionBean positionBean = new PositionBean(address,
-                            String.valueOf( amapLocation.getLatitude()),  String.valueOf(amapLocation.getLongitude()),
-                            amapLocation.getProvince(), amapLocation.getCity(),
-                            amapLocation.getDistrict(),
-                            amapLocation.getAdCode()
-                    );
-
-                    Log.e("shy", "address="+address);
-
-                    CCRetrofit.instance()
-                            .create(IApp.class)
-                            .setDatas(positionBean)
-                            .subscribe();
-
-                } else {
-                    //显示错误信息ErrCode是错误码,errInfo是错误信息,详见错误码表。
-                    Log.e("AmapError", "location Error, ErrCode:"
-                            + amapLocation.getErrorCode() + ", errInfo:"
-                            + amapLocation.getErrorInfo());
-                }
-            }
-
-        }
-    };
-
-
-}

+ 0 - 146
gaode/src/main/java/com/quansu/gaode/utils/LocationUtils.java

@@ -1,146 +0,0 @@
-package com.zswc.gaode.utils;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.util.Log;
-
-
-import com.hdgq.locationlib.LocationOpenApi;
-import com.hdgq.locationlib.entity.ShippingNoteInfo;
-import com.hdgq.locationlib.keeplive.KeepLive;
-import com.hdgq.locationlib.keeplive.config.ForegroundNotification;
-import com.hdgq.locationlib.keeplive.config.ForegroundNotificationClickListener;
-import com.hdgq.locationlib.keeplive.config.KeepLiveService;
-import com.hdgq.locationlib.listener.OnResultListener;
-import com.zswc.gaode.BuildConfig;
-import com.zswc.gaode.R;
-import com.ysnows.base.base.BApp;
-
-
-
-/**
- * Created by shihuiyun
- * on 2020/10/26
- */
-public class LocationUtils {
-
-
-    public static void setNotification() {
-
-        ForegroundNotification foregroundNotification = new ForegroundNotification("测试", "描述", R.mipmap.ic_launcher,
-                new ForegroundNotificationClickListener() {
-                    @Override
-                    public void foregroundNotificationClick(Context context, Intent intent) {
-
-                    }
-                });
-        //启动保活服务
-
-        KeepLive.startWork(BApp.instance(), KeepLive.RunMode.ENERGY,
-                foregroundNotification, new KeepLiveService() {
-                    @Override
-                    public void onWorking() {
-                        /**
-                         * 运行中
-                         * 由于服务可能会多次自动启动,该方法可能重复调用
-                         */
-
-                        Log.e("-shy-", "onWorking: ");
-
-                    }
-
-
-                    @Override
-                    public void onStop() {
-                        /**
-                         * 服务终止
-                         * 由于服务可能会被多次终止,该方法可能重复调用,需同 onWorking 配
-                         套使用,
-                         * 如注册和注销 broadcast */
-                        Log.e("-shy-", "onStop: ");
-
-                    }
-                });
-
-
-    }
-
-    //在启动页或 app 首页中,初始化 sdk 服务。context 必须为 activity。
-    public static void initLoacation(Context context) {
-
-
-        String environment = "release";
-        if (BuildConfig.DEBUG) {
-            environment = "debug";
-        }
-
-        Log.e("-shy-", "environment=" + environment);
-
-        Log.e("-shy-", "appID=: " + BApp.instance().config().appId());
-
-        LocationOpenApi.init((Activity) context, BApp.instance().config().appId(), BApp.instance().config().appSecurity(),
-                BApp.instance().config().enterpriseSenderCode(),
-                environment, new OnResultListener() {
-                    @Override
-                    public void onSuccess() {
-                        Log.e("-shy-", "onSuccess: ");
-
-                    }
-
-                    @Override
-                    public void onFailure(String s, String s1) {
-                        Log.e("-shy-", "s=: " + s + "//s1=" + s1);
-
-                    }
-                });
-
-
-    }
-
-    //启动服务,context 必须为 activity。
-
-
-    public static void loacationStart(Context context, ShippingNoteInfo[] shippingNoteInfos) {
-
-
-        LocationOpenApi.start((Activity) context, shippingNoteInfos, new OnResultListener() {
-            @Override
-            public void onSuccess() {
-
-                Log.e("-shy-", "onSuccess: ");
-
-            }
-
-            @Override
-            public void onFailure(String s, String s1) {
-                Log.e("-shy-", "s=: " + s + "//s1=" + s1);
-
-            }
-        });
-
-    }
-
-    //停止服务。context 必须为 activity。
-
-    public static void loacationStop(Context context, ShippingNoteInfo[] shippingNoteInfos) {
-
-        LocationOpenApi.stop((Activity) context, shippingNoteInfos, new OnResultListener() {
-            @Override
-            public void onSuccess() {
-
-            }
-
-            @Override
-            public void onFailure(String s, String s1) {
-                Log.e("-shy-", "s=: " + s + "//s1=" + s1);
-
-            }
-        });
-    }
-
-
-
-
-
-}

+ 0 - 217
gaode/src/main/java/com/quansu/gaode/utils/RouteOverlay.java

@@ -1,217 +0,0 @@
-package com.zswc.gaode.utils;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.Color;
-
-import com.amap.api.maps.AMap;
-import com.amap.api.maps.CameraUpdateFactory;
-import com.amap.api.maps.model.BitmapDescriptor;
-import com.amap.api.maps.model.BitmapDescriptorFactory;
-import com.amap.api.maps.model.LatLng;
-import com.amap.api.maps.model.LatLngBounds;
-import com.amap.api.maps.model.Marker;
-import com.amap.api.maps.model.MarkerOptions;
-import com.amap.api.maps.model.Polyline;
-import com.amap.api.maps.model.PolylineOptions;
-import com.zswc.gaode.R;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-public class RouteOverlay {
-	protected List<Marker> stationMarkers = new ArrayList<Marker>();
-	protected List<Polyline> allPolyLines = new ArrayList<Polyline>();
-	protected Marker startMarker;
-	protected Marker endMarker;
-	protected LatLng startPoint;
-	protected LatLng endPoint;
-	protected AMap mAMap;
-	private Context mContext;
-	private Bitmap startBit, endBit, busBit, walkBit, driveBit;
-	protected boolean nodeIconVisible = true;
-
-	public RouteOverlay(Context context) {
-		mContext = context;
-	}
-
-	/**
-	 * 去掉BusRouteOverlay上所有的Marker。
-	 * @since V2.1.0
-	 */
-	public void removeFromMap() {
-		if (startMarker != null) {
-			startMarker.remove();
-
-		}
-		if (endMarker != null) {
-			endMarker.remove();
-		}
-		for (Marker marker : stationMarkers) {
-			marker.remove();
-		}
-		for (Polyline line : allPolyLines) {
-			line.remove();
-		}
-		destroyBit();
-	}
-
-	private void destroyBit() {
-		if (startBit != null) {
-			startBit.recycle();
-			startBit = null;
-		}
-		if (endBit != null) {
-			endBit.recycle();
-			endBit = null;
-		}
-		if (busBit != null) {
-			busBit.recycle();
-			busBit = null;
-		}
-		if (walkBit != null) {
-			walkBit.recycle();
-			walkBit = null;
-		}
-		if (driveBit != null) {
-			driveBit.recycle();
-			driveBit = null;
-		}
-	}
-	/**
-	 * 给起点Marker设置图标,并返回更换图标的图片。如不用默认图片,需要重写此方法。
-	 * @return 更换的Marker图片。
-	 * @since V2.1.0
-	 */
-	protected BitmapDescriptor getStartBitmapDescriptor() {
-		return BitmapDescriptorFactory.fromResource(R.drawable.amap_start);
-	}
-	/**
-	 * 给终点Marker设置图标,并返回更换图标的图片。如不用默认图片,需要重写此方法。
-	 * @return 更换的Marker图片。
-	 * @since V2.1.0
-	 */
-	protected BitmapDescriptor getEndBitmapDescriptor() {
-		return BitmapDescriptorFactory.fromResource(R.drawable.amap_end);
-	}
-	/**
-	 * 设置图标,并返回更换图标的图片。如不用默认图片,需要重写此方法。
-	 * @return 更换的Marker图片。
-	 * @since V2.1.0
-	 */
-	protected BitmapDescriptor getBusBitmapDescriptor() {
-		return BitmapDescriptorFactory.fromResource(R.drawable.amap_bus);
-	}
-	/**
-	 * 设置图标,并返回更换图标的图片。如不用默认图片,需要重写此方法。
-	 * @return 更换的Marker图片。
-	 * @since V2.1.0
-	 */
-	protected BitmapDescriptor getWalkBitmapDescriptor() {
-		return BitmapDescriptorFactory.fromResource(R.drawable.amap_man);
-	}
-
-	protected BitmapDescriptor getDriveBitmapDescriptor() {
-		return BitmapDescriptorFactory.fromResource(R.drawable.amap_car);
-	}
-
-	protected void addStartAndEndMarker() {
-		startMarker = mAMap.addMarker((new MarkerOptions())
-				.position(startPoint).icon(getStartBitmapDescriptor())
-				.title("\u8D77\u70B9"));
-		// startMarker.showInfoWindow();
-
-		endMarker = mAMap.addMarker((new MarkerOptions()).position(endPoint)
-				.icon(getEndBitmapDescriptor()).title("\u7EC8\u70B9"));
-		// mAMap.moveCamera(CameraUpdateFactory.newLatLngZoom(startPoint,
-		// getShowRouteZoom()));
-	}
-	/**
-	 * 移动镜头到当前的视角。
-	 * @since V2.1.0
-	 */
-	public void zoomToSpan() {
-		if (startPoint != null) {
-			if (mAMap == null)
-				return;
-			try {
-				LatLngBounds bounds = getLatLngBounds();
-				mAMap.animateCamera(CameraUpdateFactory
-						.newLatLngBounds(bounds, 50));
-			} catch (Throwable e) {
-				e.printStackTrace();
-			}
-		}
-	}
-
-	protected LatLngBounds getLatLngBounds() {
-		LatLngBounds.Builder b = LatLngBounds.builder();
-		b.include(new LatLng(startPoint.latitude, startPoint.longitude));
-		b.include(new LatLng(endPoint.latitude, endPoint.longitude));
-		return b.build();
-	}
-	/**
-	 * 路段节点图标控制显示接口。
-	 * @param visible true为显示节点图标,false为不显示。
-	 * @since V2.3.1
-	 */
-	public void setNodeIconVisibility(boolean visible) {
-		try {
-			nodeIconVisible = visible;
-			if (this.stationMarkers != null && this.stationMarkers.size() > 0) {
-				for (int i = 0; i < this.stationMarkers.size(); i++) {
-					this.stationMarkers.get(i).setVisible(visible);
-				}
-			}
-		} catch (Throwable e) {
-			e.printStackTrace();
-		}
-	}
-	
-	protected void addStationMarker(MarkerOptions options) {
-		if(options == null) {
-			return;
-		}
-		Marker marker = mAMap.addMarker(options);
-		if(marker != null) {
-			stationMarkers.add(marker);
-		}
-		
-	}
-
-	protected void addPolyLine(PolylineOptions options) {
-		if(options == null) {
-			return;
-		}
-		Polyline polyline = mAMap.addPolyline(options);
-		if(polyline != null) {
-			allPolyLines.add(polyline);
-		}
-	}
-
-	/***
-	 * 线的宽度
-	 * @return
-     */
-	protected float getRouteWidth() {
-		return 15f;
-	}
-
-	protected int getWalkColor() {
-		return Color.parseColor("#6db74d");
-	}
-
-	/**
-	 * 自定义路线颜色。
-	 * return 自定义路线颜色。
-	 * @since V2.2.1
-	 */
-	protected int getBusColor() {
-		return Color.parseColor("#537edc");
-	}
-
-	protected int getDriveColor() {
-		return Color.parseColor("#537edc");
-	}
-}

+ 0 - 114
gaode/src/main/java/com/quansu/gaode/utils/WalkRouteOverlay.java

@@ -1,114 +0,0 @@
-package com.zswc.gaode.utils;
-
-import android.content.Context;
-import android.graphics.Color;
-
-import com.amap.api.maps.AMap;
-import com.amap.api.maps.model.BitmapDescriptor;
-import com.amap.api.maps.model.LatLng;
-import com.amap.api.maps.model.MarkerOptions;
-import com.amap.api.maps.model.PolylineOptions;
-import com.amap.api.services.core.LatLonPoint;
-import com.amap.api.services.route.WalkPath;
-import com.amap.api.services.route.WalkStep;
-
-import java.util.List;
-
-
-public class WalkRouteOverlay extends RouteOverlay {
-
-    private PolylineOptions mPolylineOptions;
-
-    private BitmapDescriptor walkStationDescriptor= null;
-
-    private WalkPath walkPath;
-	public WalkRouteOverlay(Context context, AMap amap, WalkPath path,
-                            LatLonPoint start, LatLonPoint end) {
-		super(context);
-		this.mAMap = amap;
-		this.walkPath = path;
-		startPoint = AMapServicesUtil.convertToLatLng(start);
-		endPoint = AMapServicesUtil.convertToLatLng(end);
-	}
-	/**
-	 * 添加路线到地图中。
-	 * @since V2.1.0
-	 */
-    public void addToMap() {
-
-        initPolylineOptions();
-        try {
-            List<WalkStep> walkPaths = walkPath.getSteps();
-            mPolylineOptions.add(startPoint);
-            for (int i = 0; i < walkPaths.size(); i++) {
-                WalkStep walkStep = walkPaths.get(i);
-                LatLng latLng = AMapServicesUtil.convertToLatLng(walkStep
-                        .getPolyline().get(0));
-                
-				addWalkStationMarkers(walkStep, latLng);
-                addWalkPolyLines(walkStep);
-               
-            }
-            mPolylineOptions.add(endPoint);
-            addStartAndEndMarker();
-
-            showPolyline();
-        } catch (Throwable e) {
-            e.printStackTrace();
-        }
-    }
-	
-
-    /**
-     * @param walkStep
-     */
-    private void addWalkPolyLines(WalkStep walkStep) {
-        mPolylineOptions.addAll(AMapServicesUtil.convertArrList(walkStep.getPolyline()));
-    }
-
-    /**
-     * @param walkStep
-     * @param position
-     */
-    private void addWalkStationMarkers(WalkStep walkStep, LatLng position) {
-        addStationMarker(new MarkerOptions()
-                .position(position)
-                .title("\u65B9\u5411:" + walkStep.getAction()
-                        + "\n\u9053\u8DEF:" + walkStep.getRoad())
-                .snippet(walkStep.getInstruction()).visible(nodeIconVisible)
-                .anchor(0.5f, 0.5f).icon(walkStationDescriptor));
-    }
-
-    /**
-     * 初始化线段属性
-     */
-    private void initPolylineOptions() {
-
-        if(walkStationDescriptor == null) {
-            walkStationDescriptor = getWalkBitmapDescriptor();
-        }
-        mPolylineOptions = null;
-        mPolylineOptions = new PolylineOptions();
-        mPolylineOptions.setDottedLine(false);//设置是否为虚线
-        mPolylineOptions.geodesic(false);//是否为大地曲线
-        mPolylineOptions.visible(true);//线段是否可见
-        mPolylineOptions.useGradient(false);//设置线段是否使用渐变色
-        //设置线颜色,宽度
-        mPolylineOptions.color(getWalkColor()).width(getRouteWidth());
-
-    }
-
-
-    private void showPolyline() {
-        addPolyLine(mPolylineOptions);
-    }
-
-	/***
-	 * 轨迹颜色修改
-	 * 默认颜色在父类中
-	 * @return
-	 */
-	public int getWalkColor() {
-		return Color.parseColor("#E62BCA");
-	}
-}

+ 0 - 237
gaode/src/main/java/com/quansu/gaode/view/SegmentedGroup.java

@@ -1,237 +0,0 @@
-package com.zswc.gaode.view;
-
-import android.content.Context;
-import android.content.res.ColorStateList;
-import android.content.res.Resources;
-import android.content.res.TypedArray;
-import android.graphics.Color;
-import android.graphics.drawable.Drawable;
-import android.graphics.drawable.GradientDrawable;
-import android.graphics.drawable.StateListDrawable;
-import android.os.Build;
-import android.util.AttributeSet;
-import android.util.TypedValue;
-import android.view.View;
-import android.widget.Button;
-import android.widget.LinearLayout;
-import android.widget.RadioGroup;
-
-import com.zswc.gaode.R;
-
-
-public class SegmentedGroup extends RadioGroup {
-
-    private int mMarginDp;
-    private Resources resources;
-    private int mTintColor;
-    private int mCheckedTextColor = Color.WHITE;
-    private LayoutSelector mLayoutSelector;
-    private Float mCornerRadius;
-
-    public SegmentedGroup(Context context) {
-        super(context);
-        resources = getResources();
-        mTintColor = resources.getColor(R.color.radio_button_selected_color);
-        mMarginDp = (int) getResources().getDimension(R.dimen.radio_button_stroke_border);
-        mCornerRadius = getResources().getDimension(R.dimen.radio_button_conner_radius);
-        mLayoutSelector = new LayoutSelector(mCornerRadius);
-    }
-
-    /* Reads the attributes from the layout */
-    private void initAttrs(AttributeSet attrs) {
-        TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(
-                attrs,
-                R.styleable.SegmentedGroup,
-                0, 0);
-
-        try {
-            mMarginDp = (int) typedArray.getDimension(
-                    R.styleable.SegmentedGroup_sc_border_width,
-                    getResources().getDimension(R.dimen.radio_button_stroke_border));
-
-            mCornerRadius = typedArray.getDimension(
-                    R.styleable.SegmentedGroup_sc_corner_radius,
-                    getResources().getDimension(R.dimen.radio_button_conner_radius));
-
-            mTintColor = typedArray.getColor(
-                    R.styleable.SegmentedGroup_sc_tint_color,
-                    getResources().getColor(R.color.radio_button_selected_color));
-
-            mCheckedTextColor = typedArray.getColor(
-                    R.styleable.SegmentedGroup_sc_checked_text_color,
-                    getResources().getColor(android.R.color.white));
-
-        } finally {
-            typedArray.recycle();
-        }
-    }
-
-    public SegmentedGroup(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        resources = getResources();
-        mTintColor = resources.getColor(R.color.radio_button_selected_color);
-        mMarginDp = (int) getResources().getDimension(R.dimen.radio_button_stroke_border);
-        mCornerRadius = getResources().getDimension(R.dimen.radio_button_conner_radius);
-        initAttrs(attrs);
-        mLayoutSelector = new LayoutSelector(mCornerRadius);
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-        //Use holo light for default
-        updateBackground();
-    }
-
-    public void setTintColor(int tintColor) {
-        mTintColor = tintColor;
-        updateBackground();
-    }
-
-    public void setTintColor(int tintColor, int checkedTextColor) {
-        mTintColor = tintColor;
-        mCheckedTextColor = checkedTextColor;
-        updateBackground();
-    }
-
-    public void updateBackground() {
-        int count = super.getChildCount();
-        for (int i = 0; i < count; i++) {
-            View child = getChildAt(i);
-            updateBackground(child);
-
-            // If this is the last view, don't set LayoutParams
-            if (i == count - 1) break;
-
-            LayoutParams initParams = (LayoutParams) child.getLayoutParams();
-            LayoutParams params = new LayoutParams(initParams.width, initParams.height, initParams.weight);
-            // Check orientation for proper margins
-            if (getOrientation() == LinearLayout.HORIZONTAL) {
-                params.setMargins(0, 0, -mMarginDp, 0);
-            } else {
-                params.setMargins(0, 0, 0, -mMarginDp);
-            }
-            child.setLayoutParams(params);
-        }
-    }
-
-    private void updateBackground(View view) {
-        int checked = mLayoutSelector.getSelected();
-        int unchecked = mLayoutSelector.getUnselected();
-        //Set text color
-        ColorStateList colorStateList = new ColorStateList(new int[][]{
-                {android.R.attr.state_pressed},
-                {-android.R.attr.state_pressed, -android.R.attr.state_checked},
-                {-android.R.attr.state_pressed, android.R.attr.state_checked}},
-                new int[]{Color.GRAY, mTintColor, mCheckedTextColor});
-        ((Button) view).setTextColor(colorStateList);
-
-        //Redraw with tint color
-        Drawable checkedDrawable = resources.getDrawable(checked).mutate();
-        Drawable uncheckedDrawable = resources.getDrawable(unchecked).mutate();
-        ((GradientDrawable) checkedDrawable).setColor(mTintColor);
-        ((GradientDrawable) checkedDrawable).setStroke(mMarginDp, mTintColor);
-        ((GradientDrawable) uncheckedDrawable).setStroke(mMarginDp, mTintColor);
-        //Set proper radius
-        ((GradientDrawable) checkedDrawable).setCornerRadii(mLayoutSelector.getChildRadii(view));
-        ((GradientDrawable) uncheckedDrawable).setCornerRadii(mLayoutSelector.getChildRadii(view));
-
-        //Create drawable
-        StateListDrawable stateListDrawable = new StateListDrawable();
-        stateListDrawable.addState(new int[]{-android.R.attr.state_checked}, uncheckedDrawable);
-        stateListDrawable.addState(new int[]{android.R.attr.state_checked}, checkedDrawable);
-
-        //Set button background
-        if (Build.VERSION.SDK_INT >= 16) {
-            view.setBackground(stateListDrawable);
-        } else {
-            view.setBackgroundDrawable(stateListDrawable);
-        }
-    }
-
-    /*
-     * This class is used to provide the proper layout based on the view.
-     * Also provides the proper radius for corners.
-     * The layout is the same for each selected left/top middle or right/bottom button.
-     * float tables for setting the radius via Gradient.setCornerRadii are used instead
-     * of multiple xml drawables.
-     */
-    private class LayoutSelector {
-
-        private int children;
-        private int child;
-        private final int SELECTED_LAYOUT = R.drawable.radio_checked;
-        private final int UNSELECTED_LAYOUT = R.drawable.radio_unchecked;
-
-        private float r;    //this is the radios read by attributes or xml dimens
-        private final float r1 = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP
-                , 0.1f, getResources().getDisplayMetrics());    //0.1 dp to px
-        private final float[] rLeft;    // left radio button
-        private final float[] rRight;   // right radio button
-        private final float[] rMiddle;  // middle radio button
-        private final float[] rDefault; // default radio button
-        private final float[] rTop;     // top radio button
-        private final float[] rBot;     // bot radio button
-        private float[] radii;          // result radii float table
-
-        public LayoutSelector(float cornerRadius) {
-            children = -1; // Init this to force setChildRadii() to enter for the first time.
-            child = -1; // Init this to force setChildRadii() to enter for the first time
-            r = cornerRadius;
-            rLeft = new float[]{r, r, r1, r1, r1, r1, r, r};
-            rRight = new float[]{r1, r1, r, r, r, r, r1, r1};
-            rMiddle = new float[]{r1, r1, r1, r1, r1, r1, r1, r1};
-            rDefault = new float[]{r, r, r, r, r, r, r, r};
-            rTop = new float[]{r, r, r, r, r1, r1, r1, r1};
-            rBot = new float[]{r1, r1, r1, r1, r, r, r, r};
-        }
-
-        private int getChildren() {
-            return SegmentedGroup.this.getChildCount();
-        }
-
-        private int getChildIndex(View view) {
-            return SegmentedGroup.this.indexOfChild(view);
-        }
-
-        private void setChildRadii(int newChildren, int newChild) {
-
-            // If same values are passed, just return. No need to update anything
-            if (children == newChildren && child == newChild)
-                return;
-
-            // Set the new values
-            children = newChildren;
-            child = newChild;
-
-            // if there is only one child provide the default radio button
-            if (children == 1) {
-                radii = rDefault;
-            } else if (child == 0) { //left or top
-                radii = (getOrientation() == LinearLayout.HORIZONTAL) ? rLeft : rTop;
-            } else if (child == children - 1) {  //right or bottom
-                radii = (getOrientation() == LinearLayout.HORIZONTAL) ? rRight : rBot;
-            } else {  //middle
-                radii = rMiddle;
-            }
-        }
-
-        /* Returns the selected layout id based on view */
-        public int getSelected() {
-            return SELECTED_LAYOUT;
-        }
-
-        /* Returns the unselected layout id based on view */
-        public int getUnselected() {
-            return UNSELECTED_LAYOUT;
-        }
-
-        /* Returns the radii float table based on view for Gradient.setRadii()*/
-        public float[] getChildRadii(View view) {
-            int newChildren = getChildren();
-            int newChild = getChildIndex(view);
-            setChildRadii(newChildren, newChild);
-            return radii;
-        }
-    }
-}

TEMPAT SAMPAH
gaode/src/main/jniLibs/armeabi-v7a/libAMapSDK_MAP_v7_1_0.so


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/amap_bus.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/amap_car.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/amap_end.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/amap_enter.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/amap_man.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/amap_out.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/amap_start.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/end.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/gaode_delete.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/gaode_serch.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/ic_vehicle.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/icon_affirm_selected.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/purple_pin.webp


TEMPAT SAMPAH
gaode/src/main/res/drawable-xxhdpi/start.webp


+ 0 - 6
gaode/src/main/res/drawable/bg_search_shape_44.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <solid android:color="#ffffff"/>
-    <corners android:radius="44dp"/>
-</shape>

+ 0 - 6
gaode/src/main/res/drawable/button_text_color.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_pressed="true" android:color="#DDd4d4d4" />
-    <item android:state_pressed="false" android:state_checked="false" android:color="@color/radio_button_selected_color" />
-    <item android:state_pressed="false" android:state_checked="true" android:color="#fff2f2f2" />
-</selector>

+ 0 - 30
gaode/src/main/res/drawable/custom_progress_bar.xml

@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
-    android:oneshot="false" >
-
-    <item
-        android:drawable="@mipmap/loading_0"
-        android:duration="100"/>
-    <item
-        android:drawable="@mipmap/loading_1"
-        android:duration="100"/>
-    <item
-        android:drawable="@mipmap/loading_2"
-        android:duration="100"/>
-    <item
-        android:drawable="@mipmap/loading_3"
-        android:duration="100"/>
-    <item
-        android:drawable="@mipmap/loading_4"
-        android:duration="100"/>
-    <item
-        android:drawable="@mipmap/loading_5"
-        android:duration="100"/>
-    <item
-        android:drawable="@mipmap/loading_6"
-        android:duration="100"/>
-    <item
-        android:drawable="@mipmap/loading_7"
-        android:duration="100"/>
-
-</animation-list>

+ 0 - 16
gaode/src/main/res/drawable/gaode_stock_gary.xml

@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-android:shape="rectangle" >
-
-<!-- 填充的颜色-->
-
-
-    <solid android:color="#ffffff" />
-
-    <stroke
-        android:width="1dp"
-        android:color="#B8B7B6" />
-
-    <corners android:radius="2dp" />
-
-</shape >

+ 0 - 13
gaode/src/main/res/drawable/gaode_stock_white.xml

@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-android:shape="rectangle" >
-
-<!-- 填充的颜色-->
-
-
-    <solid android:color="#ffffff" />
-
-
-    <corners android:radius="2dp" />
-
-</shape >

+ 0 - 9
gaode/src/main/res/drawable/ic_arrow_back_black_24dp.xml

@@ -1,9 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="24dp"
-        android:height="24dp"
-        android:viewportWidth="24.0"
-        android:viewportHeight="24.0">
-    <path
-        android:fillColor="#FF000000"
-        android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
-</vector>

+ 0 - 10
gaode/src/main/res/drawable/radio_checked.xml

@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="rectangle"
-    android:padding="10dp">
-    <!-- you can use any color you want I used here gray color-->
-    <solid android:color="@color/radio_button_bill_color" />
-    <stroke
-        android:width="@dimen/radio_button_stroke_border"
-        android:color="@color/radio_button_bill_color" />
-</shape>

+ 0 - 10
gaode/src/main/res/drawable/radio_unchecked.xml

@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
-    android:shape="rectangle"
-    android:padding="10dp">
-    <!-- you can use any color you want I used here gray color-->
-    <solid android:color="@color/radio_button_unselected_color" />
-    <stroke
-        android:width="@dimen/radio_button_stroke_border"
-        android:color="@color/radio_button_selected_color" />
-</shape>

+ 0 - 267
gaode/src/main/res/layout/activity_gaode.xml

@@ -1,267 +0,0 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="#F6F6F6"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:orientation="vertical">
-
-    <!--标题栏-->
-
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="50dp"
-        android:orientation="horizontal">
-
-        <ImageView
-            android:id="@+id/img_left"
-            android:layout_width="50dp"
-            android:layout_height="50dp"
-            android:layout_centerVertical="true"
-            android:layout_gravity="center_vertical"
-            android:background="?android:selectableItemBackground"
-            android:padding="@dimen/dp_13"
-            android:src="@drawable/ic_arrow_back_black_24dp"
-            />
-
-        <TextView
-            android:id="@+id/tv_title"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:ellipsize="marquee"
-            android:gravity="center"
-            android:maxWidth="180dp"
-            android:singleLine="true"
-            android:text="选点"
-            android:textColor="@color/black"
-            android:textSize="@dimen/sp_16"
-            android:textStyle="bold" />
-
-        <TextView
-            android:id="@+id/tv_right"
-            android:layout_width="50dp"
-            android:layout_height="50dp"
-            android:gravity="center"
-            android:text="确定"
-            android:textColor="@color/black"
-            android:textSize="15sp"></TextView>
-
-
-    </LinearLayout>
-
-
-    <!--    搜索-->
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="50dp"
-        android:focusable="true"
-        android:layout_marginLeft="12dp"
-        android:layout_marginRight="12dp"
-        android:focusableInTouchMode="true"
-        android:orientation="horizontal"
-        android:gravity="center_vertical"
-        android:visibility="gone">
-
-
-        <LinearLayout
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:background="@drawable/gaode_stock_white"
-            android:gravity="center_vertical"
-            android:orientation="horizontal"
-            android:paddingLeft="10dp"
-            android:paddingRight="10dp">
-
-            <ImageView
-                android:layout_width="12dp"
-                android:layout_height="12dp"
-                android:src="@drawable/gaode_serch">
-
-            </ImageView>
-
-            <AutoCompleteTextView
-                android:id="@+id/keyWord"
-                android:layout_width="0dp"
-                android:layout_height="34dp"
-                android:layout_weight="1"
-                android:background="@null"
-                android:completionThreshold="1"
-                android:dropDownVerticalOffset="10.0dp"
-                android:focusable="true"
-                android:hint="地点"
-                android:imeOptions="actionDone"
-                android:inputType="text|textAutoComplete"
-                android:maxLength="20"
-                android:paddingLeft="15dp"
-                android:paddingRight="10dp"
-                android:singleLine="true"
-                android:textColor="#2F2F31"
-                android:textColorHint="#929390"
-                android:textSize="14sp" />
-
-            <ImageView
-                android:id="@+id/iv_delete"
-                android:layout_width="14dp"
-                android:layout_height="14dp"
-                android:layout_marginLeft="10dp"
-                android:src="@drawable/gaode_delete">
-
-            </ImageView>
-
-        </LinearLayout>
-
-        <TextView
-            android:id="@+id/tv_serch"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="7dp"
-            android:gravity="center|left"
-            android:text="搜索"
-            android:textColor="#2F2F31"
-            android:textSize="15sp">
-
-        </TextView>
-
-
-    </LinearLayout>
-
-
-    <LinearLayout
-        android:id="@+id/ll_search"
-        android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:layout_marginLeft="20dp"
-        android:layout_marginRight="20dp"
-        android:layout_marginBottom="10dp"
-        android:background="@drawable/gaode_stock_white"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        android:paddingLeft="10dp"
-        android:paddingRight="10dp">
-
-        <ImageView
-            android:layout_width="12dp"
-            android:layout_height="12dp"
-            android:src="@drawable/gaode_serch">
-
-        </ImageView>
-
-        <LinearLayout
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:gravity="center_vertical|left"
-            android:orientation="horizontal">
-
-            <TextView
-                android:id="@+id/tv"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="15dp"
-                android:hint="地点"
-                android:textColor="#2F2F31"
-                android:textColorHint="#929390"
-                android:textSize="14sp">
-
-            </TextView>
-        </LinearLayout>
-
-
-    </LinearLayout>
-
-
-    <com.amap.api.maps.MapView
-        android:id="@+id/map"
-        android:layout_width="match_parent"
-        android:layout_height="240dp" />
-
-
-    <LinearLayout
-        android:id="@+id/current_location"
-        android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        android:paddingLeft="12dp"
-        android:paddingRight="8dp">
-
-        <TextView
-            android:id="@+id/text_title"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:gravity="center_vertical"
-            android:text="使用当前定位位置"
-            android:textColor="#272727"
-            android:textSize="16sp"/>
-
-
-        <ImageView
-            android:id="@+id/image_check"
-            android:layout_width="32dp"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="8dp"
-            android:src="@drawable/purple_pin" />
-
-    </LinearLayout>
-
-    <com.quansu.gaode.view.SegmentedGroup xmlns:segmentedgroup="http://schemas.android.com/apk/res-auto"
-        android:id="@+id/segmented_group"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:padding="4dp"
-        segmentedgroup:sc_border_width="1dp"
-        segmentedgroup:sc_corner_radius="2dp">
-
-        <RadioButton
-            android:id="@+id/radio0"
-            style="@style/RadioButton"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight=".5"
-            android:checked="true"
-            android:text="不限" />
-
-        <RadioButton
-            android:id="@+id/radio1"
-            style="@style/RadioButton"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight=".5"
-            android:text="学校" />
-
-        <RadioButton
-            android:id="@+id/radio2"
-            style="@style/RadioButton"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight=".5"
-            android:text="楼宇" />
-
-        <RadioButton
-            android:id="@+id/radio3"
-            style="@style/RadioButton"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight=".33"
-            android:text="商场" />
-
-    </com.quansu.gaode.view.SegmentedGroup>
-
-
-    <ListView
-        android:id="@+id/listview"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_weight="1"
-        android:cacheColorHint="#00000000"
-        android:divider="@android:color/darker_gray"
-        android:dividerHeight="1px" />
-
-
-</LinearLayout>

+ 0 - 160
gaode/src/main/res/layout/activity_search_address.xml

@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="#F6F6F6"
-    android:gravity="center_horizontal"
-    android:orientation="vertical">
-
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="50dp"
-        android:orientation="horizontal">
-
-        <ImageView
-            android:id="@+id/tv_title_back"
-            android:layout_width="50dp"
-            android:layout_height="50dp"
-            android:layout_centerVertical="true"
-            android:layout_gravity="center_vertical"
-            android:background="?android:selectableItemBackground"
-            android:padding="@dimen/dp_13"
-            android:src="@drawable/ic_arrow_back_black_24dp"
-            />
-
-        <TextView
-            android:id="@+id/tv_title"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:ellipsize="marquee"
-            android:gravity="center"
-            android:maxWidth="180dp"
-            android:singleLine="true"
-            android:text="地点搜索"
-            android:textColor="@color/black"
-            android:textSize="@dimen/sp_16"
-            android:textStyle="bold" />
-
-        <TextView
-            android:id="@+id/tv_right"
-            android:layout_width="50dp"
-            android:layout_height="50dp"
-            android:gravity="center"
-            android:text="确定"
-            android:textColor="@color/black"
-            android:textSize="15sp"
-            android:visibility="invisible"></TextView>
-
-
-    </LinearLayout>
-
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="50dp"
-        android:layout_marginLeft="12dp"
-        android:layout_marginRight="12dp"
-        android:focusable="true"
-        android:focusableInTouchMode="true"
-        android:gravity="center_vertical"
-        android:orientation="horizontal">
-
-
-        <LinearLayout
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:background="@drawable/gaode_stock_white"
-            android:gravity="center_vertical"
-            android:orientation="horizontal"
-            android:paddingLeft="10dp"
-            android:paddingRight="10dp">
-
-            <ImageView
-                android:layout_width="12dp"
-                android:layout_height="12dp"
-                android:src="@drawable/gaode_serch">
-
-            </ImageView>
-
-            <EditText
-                android:id="@+id/et_search"
-                android:layout_width="0dp"
-                android:layout_height="34dp"
-                android:layout_centerHorizontal="true"
-                android:layout_weight="1"
-                android:background="@drawable/bg_search_shape_44"
-                android:hint="请输入地点"
-                android:imeOptions="actionDone"
-                android:paddingLeft="15dp"
-                android:paddingRight="10dp"
-                android:singleLine="true"
-                android:textColor="#2F2F31"
-                android:textColorHint="#929390"
-                android:textSize="14sp"
-                />
-
-
-            <ImageView
-                android:id="@+id/iv_delete"
-                android:layout_width="14dp"
-                android:layout_height="14dp"
-                android:layout_marginLeft="10dp"
-                android:src="@drawable/gaode_delete">
-
-            </ImageView>
-
-        </LinearLayout>
-
-        <TextView
-            android:id="@+id/tv_title_right"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="7dp"
-            android:gravity="center|left"
-            android:text="搜索"
-            android:textColor="#2F2F31"
-            android:textSize="15sp">
-
-        </TextView>
-
-
-    </LinearLayout>
-
-
-
-    <com.quansu.gaode.activity.AutoListView
-        android:id="@+id/lv_list"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:cacheColorHint="#00000000"
-        android:listSelector="#00000000"
-        android:visibility="visible">
-    </com.quansu.gaode.activity.AutoListView>
-
-    <TextView
-        android:id="@+id/tv_no_data"
-        style="@style/txt_style"
-        android:layout_marginTop="30dp"
-        android:text="未能查找到相关地点"
-        android:visibility="gone" />
-    <LinearLayout
-        android:id="@+id/ll_loading"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center_horizontal"
-        android:orientation="vertical"
-        android:visibility="gone">
-        <ProgressBar
-            android:layout_width="25dp"
-            android:layout_height="25dp" />
-        <TextView
-            style="@style/txt_style3"
-            android:text="正在查找..."
-            android:visibility="visible" />
-    </LinearLayout>
-
-</LinearLayout>

+ 0 - 38
gaode/src/main/res/layout/autolistview_footer.xml

@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:gravity="center"
-    android:orientation="horizontal" >
-
-    <TextView
-        android:id="@+id/loadFull"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:gravity="center"
-        android:padding="5dp"
-        android:text="@string/load_full"
-        android:visibility="gone" />
-
-    <TextView
-        android:id="@+id/noData"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:gravity="center"
-        android:padding="5dp"
-        android:text="@string/no_data"
-        android:visibility="gone" />
-
-    <TextView
-        android:id="@+id/more"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:gravity="center"
-        android:padding="5dp"
-        android:text="@string/more" />
-
-    <ProgressBar
-        android:id="@+id/loading"
-        style="@style/customProgressBar" />
-
-</LinearLayout>

+ 0 - 12
gaode/src/main/res/layout/gaode_end_marker.xml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <ImageView
-        android:layout_width="35dp"
-        android:layout_height="35dp"
-        android:src="@drawable/end">
-    </ImageView>
-
-</LinearLayout>

+ 0 - 12
gaode/src/main/res/layout/gaode_item_marker.xml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <ImageView xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="20dp"
-        android:layout_height="27dp"
-        android:src="@drawable/purple_pin">
-    </ImageView>
-
-</LinearLayout>

+ 0 - 12
gaode/src/main/res/layout/gaode_start_marker.xml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <ImageView
-        android:layout_width="35dp"
-        android:layout_height="35dp"
-        android:src="@drawable/start">
-    </ImageView>
-
-</LinearLayout>

+ 0 - 39
gaode/src/main/res/layout/item_select_address.xml

@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:background="#ffffff"
-
-    android:gravity="center_vertical"
-    android:minHeight="70dp"
-    android:orientation="horizontal"
-    android:paddingTop="5dp"
-    android:paddingBottom="5dp">
-
-    <LinearLayout
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="10dp"
-        android:layout_weight="1"
-
-        android:orientation="vertical">
-        <TextView
-            android:id="@+id/tv_title"
-            style="@style/txt_style"
-            android:text="中国科学院大学" />
-        <TextView
-            android:id="@+id/tv_address"
-            style="@style/txt_style2"
-            android:layout_marginTop="10dp"
-            android:singleLine="true"
-            android:text="北京市石景山区玉泉路"
-            android:visibility="visible"/>
-    </LinearLayout>
-
-    <ImageView
-        android:id="@+id/iv_checked"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginRight="10dp"
-        android:src="@mipmap/point4" />
-</LinearLayout>

+ 0 - 202
gaode/src/main/res/layout/map_layout.xml

@@ -1,202 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:orientation="vertical">
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="50dp"
-        android:gravity="center_vertical"
-        android:orientation="horizontal">
-
-        <ImageView
-            android:id="@+id/img_back"
-            android:layout_width="20dp"
-            android:layout_height="20dp"
-            android:layout_marginStart="15dp"
-            android:src="@drawable/ic_back_black" />
-
-
-        <TextView
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginEnd="35dp"
-            android:gravity="center"
-            android:text="轨迹信息"
-            android:textColor="#26292F"
-            android:textSize="20sp" />
-
-
-    </LinearLayout>
-
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="1dp"
-        android:background="#E3E4E5" />
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="25dp"
-        android:orientation="horizontal"
-        android:paddingStart="19dp"
-        android:paddingEnd="18dp">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="发货位置"
-            android:textColor="#636465"
-            android:textSize="15sp" />
-
-        <TextView
-            android:id="@+id/tv_start"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="10dp"
-            android:layout_weight="1"
-            android:gravity="right"
-            android:textColor="#26292F"
-            android:textSize="15sp"
-            tools:text="山东省 临沂市 河东区" />
-
-        <ImageView
-            android:layout_width="17dp"
-            android:layout_height="22dp"
-            android:layout_marginStart="7dp"
-            android:src="@drawable/amap_out" />
-
-
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="19dp"
-        android:layout_marginBottom="26dp"
-        android:orientation="horizontal"
-        android:paddingStart="19dp"
-        android:paddingEnd="18dp">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="卸货位置"
-            android:textColor="#636465"
-            android:textSize="15sp" />
-
-        <TextView
-            android:id="@+id/tv_end"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="10dp"
-            android:layout_weight="1"
-            android:gravity="right"
-            android:textColor="#26292F"
-            android:textSize="15sp"
-            tools:text="山东省 临沂市 河东区" />
-
-        <ImageView
-            android:layout_width="17dp"
-            android:layout_height="22dp"
-            android:layout_marginStart="7dp"
-            android:src="@drawable/amap_enter" />
-
-
-    </LinearLayout>
-
-    <FrameLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1">
-
-        <com.amap.api.maps.MapView
-            android:id="@+id/map_two"
-            android:visibility="gone"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" />
-
-        <com.amap.api.maps.MapView
-            android:id="@+id/map_three"
-            android:visibility="gone"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" />
-
-        <com.amap.api.maps.MapView
-            android:id="@+id/map"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" />
-
-
-    </FrameLayout>
-
-
-    <LinearLayout
-        android:id="@+id/ll_bottom"
-        android:layout_width="match_parent"
-        android:orientation="horizontal"
-        android:gravity="center_vertical"
-        android:visibility="gone"
-        tools:visibility="visible"
-        android:layout_marginStart="15dp"
-        android:layout_marginEnd="15dp"
-        android:layout_height="50dp">
-
-
-        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
-            android:id="@+id/but_one"
-            android:layout_width="0dp"
-            android:layout_weight="1"
-            android:text="路线一"
-            android:textSize="15sp"
-            android:textColor="@color/white"
-            app:qmui_backgroundColor="#F3AE3D"
-            app:qmui_borderColor="#F3AE3D"
-            android:visibility="gone"
-            tools:visibility="visible"
-            app:qmui_radius="20dp"
-            android:gravity="center"
-            android:layout_height="45dp"/>
-
-        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
-            android:id="@+id/but_two"
-            android:layout_width="0dp"
-            android:layout_weight="1"
-            android:text="路线二"
-            android:textSize="15sp"
-            android:visibility="gone"
-            tools:visibility="visible"
-            android:textColor="@color/white"
-            app:qmui_backgroundColor="#F3AE3D"
-            app:qmui_borderColor="#F3AE3D"
-            android:layout_marginLeft="@dimen/dp_10"
-            app:qmui_radius="20dp"
-            android:gravity="center"
-            android:layout_height="45dp"/>
-
-        <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
-            android:id="@+id/but_three"
-            android:layout_width="0dp"
-            android:visibility="gone"
-            tools:visibility="visible"
-            android:layout_weight="1"
-            android:text="路线三"
-            android:textSize="15sp"
-            android:textColor="@color/white"
-            app:qmui_backgroundColor="#F3AE3D"
-            app:qmui_borderColor="#F3AE3D"
-            android:layout_marginLeft="@dimen/dp_10"
-            app:qmui_radius="20dp"
-            android:gravity="center"
-            android:layout_height="45dp"/>
-
-
-
-    </LinearLayout>
-
-
-</LinearLayout>

+ 0 - 122
gaode/src/main/res/layout/map_route.xml

@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="50dp"
-        android:gravity="center_vertical"
-        android:orientation="horizontal">
-
-        <ImageView
-            android:id="@+id/img_back"
-            android:layout_width="20dp"
-            android:layout_height="20dp"
-            android:layout_marginStart="15dp"
-            android:src="@drawable/ic_back_black" />
-
-
-        <TextView
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginEnd="35dp"
-            android:gravity="center"
-            android:text="轨迹信息"
-            android:textColor="#26292F"
-            android:textSize="20sp" />
-
-
-    </LinearLayout>
-
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="1dp"
-        android:background="#E3E4E5" />
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="25dp"
-        android:orientation="horizontal"
-        android:paddingStart="19dp"
-        android:paddingEnd="18dp">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="发货位置"
-            android:textColor="#636465"
-            android:textSize="15sp" />
-
-        <TextView
-            android:id="@+id/tv_start"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="10dp"
-            android:layout_weight="1"
-            android:gravity="right"
-            android:textColor="#26292F"
-            android:textSize="15sp"
-            tools:text="山东省 临沂市 河东区" />
-
-        <ImageView
-            android:layout_width="17dp"
-            android:layout_height="22dp"
-            android:layout_marginStart="7dp"
-            android:src="@drawable/amap_out" />
-
-
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="19dp"
-        android:layout_marginBottom="26dp"
-        android:orientation="horizontal"
-        android:paddingStart="19dp"
-        android:paddingEnd="18dp">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="卸货位置"
-            android:textColor="#636465"
-            android:textSize="15sp" />
-
-        <TextView
-            android:id="@+id/tv_end"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="10dp"
-            android:layout_weight="1"
-            android:gravity="right"
-            android:textColor="#26292F"
-            android:textSize="15sp"
-            tools:text="山东省 临沂市 河东区" />
-
-        <ImageView
-            android:layout_width="17dp"
-            android:layout_height="22dp"
-            android:layout_marginStart="7dp"
-            android:src="@drawable/amap_enter" />
-
-
-    </LinearLayout>
-
-
-
-        <com.amap.api.maps.MapView
-            android:id="@+id/map"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" />
-
-
-
-
-
-</LinearLayout>

+ 0 - 49
gaode/src/main/res/layout/pull_to_refresh_header.xml

@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:gravity="center"
-    android:orientation="vertical" >
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginBottom="10dp" >
-
-        <LinearLayout
-            android:id="@+id/layout"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerHorizontal="true"
-            android:layout_centerVertical="true"
-            android:orientation="vertical" >
-
-            <ProgressBar
-                android:id="@+id/refreshing"
-                style="@style/customProgressBar" />
-
-            <TextView
-                android:id="@+id/tip"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center" />
-
-            <TextView
-                android:id="@+id/lastUpdate"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:textSize="12sp" />
-        </LinearLayout>
-
-        <ImageView
-            android:id="@+id/arrow"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerVertical="true"
-            android:layout_marginRight="20dp"
-            android:layout_toLeftOf="@id/layout"
-            android:contentDescription="@string/d"
-            android:src="@mipmap/pull_to_refresh_arrow" />
-    </RelativeLayout>
-</LinearLayout>

+ 0 - 41
gaode/src/main/res/layout/view_holder_result.xml

@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="horizontal"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:padding="8dp"
-    android:gravity="center_vertical">
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        android:layout_weight="1">
-
-        <TextView
-            android:id="@+id/text_title"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:gravity="center_vertical"
-            android:textSize="15sp"
-            android:text="title"/>
-
-        <TextView
-            android:id="@+id/text_title_sub"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:textSize="13sp"
-            android:text="sub_title"
-            android:layout_marginTop="6dp"
-            android:textColor="@android:color/darker_gray"/>
-
-    </LinearLayout>
-
-    <ImageView
-        android:id="@+id/image_check"
-        android:layout_width="32dp"
-        android:layout_height="32dp"
-        android:src="@drawable/icon_affirm_selected"
-        android:layout_marginLeft="8dp"/>
-
-</LinearLayout>

TEMPAT SAMPAH
gaode/src/main/res/mipmap-hdpi/loading_0.png


TEMPAT SAMPAH
gaode/src/main/res/mipmap-hdpi/loading_1.png


TEMPAT SAMPAH
gaode/src/main/res/mipmap-hdpi/loading_2.png


TEMPAT SAMPAH
gaode/src/main/res/mipmap-hdpi/loading_3.png


TEMPAT SAMPAH
gaode/src/main/res/mipmap-hdpi/loading_4.png


TEMPAT SAMPAH
gaode/src/main/res/mipmap-hdpi/loading_5.png


TEMPAT SAMPAH
gaode/src/main/res/mipmap-hdpi/loading_6.png


TEMPAT SAMPAH
gaode/src/main/res/mipmap-hdpi/loading_7.png


TEMPAT SAMPAH
gaode/src/main/res/mipmap-hdpi/poi_marker_1.png


TEMPAT SAMPAH
gaode/src/main/res/mipmap-hdpi/point4.png


TEMPAT SAMPAH
gaode/src/main/res/mipmap-hdpi/pull_to_refresh_arrow.png


+ 0 - 7
gaode/src/main/res/values/colors.xml

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
-    <color name="radio_button_bill_color">#4070FF</color>
-    <color name="radio_button_unselected_color">@android:color/transparent</color>
-
-</resources>

+ 0 - 3
gaode/src/main/res/values/dimens.xml

@@ -1,3 +0,0 @@
-<resources >
-
-</resources >

+ 0 - 13
gaode/src/main/res/values/strings.xml

@@ -1,13 +0,0 @@
-<resources >
-    <string name="app_name" >BDLoc</string >
-    <!-- autolistview -->
-    <string name="pull_to_refresh">下拉可以刷新</string>
-    <string name="release_to_refresh">松开可以刷新</string>
-    <string name="lastUpdateTime">最近更新:%s</string>
-    <string name="load_full">已加载全部</string>
-    <string name="no_data">暂无数据</string>
-    <string name="more">加载中</string>
-    <string name="d">图片描述</string>
-    <string name="no_result">对不起,没有搜索到相关数据!</string>
-
-</resources >

+ 0 - 54
gaode/src/main/res/values/styles.xml

@@ -1,54 +0,0 @@
-<resources >
-
-    <!-- autolistview -->
-    <style name="customProgressBar" parent="@android:style/Widget.ProgressBar.Small">
-        <item name="android:indeterminateDrawable">@drawable/custom_progress_bar</item>
-        <item name="android:layout_width">21dip</item>
-        <item name="android:layout_height">21dip</item>
-        <item name="android:layout_gravity">center</item>
-    </style>
-
-    <!--一级文字样式-->
-    <style name="txt_style">
-        <item name="android:layout_width">wrap_content</item>
-        <item name="android:layout_height">wrap_content</item>
-        <item name="android:gravity">center</item>
-        <item name="android:textSize">16sp</item>
-        <item name="android:textColor">#333333</item>
-    </style>
-    <!--二级文字样式-->
-    <style name="txt_style2">
-        <item name="android:layout_width">wrap_content</item>
-        <item name="android:layout_height">wrap_content</item>
-        <item name="android:textSize">14sp</item>
-        <item name="android:textColor">#8f8f8f</item>
-    </style>
-    <!--三级文字样式-->
-    <style name="txt_style3">
-        <item name="android:layout_width">wrap_content</item>
-        <item name="android:layout_height">wrap_content</item>
-        <item name="android:textSize">12sp</item>
-        <item name="android:textColor">#8f8f8f</item>
-    </style>
-
-    <style name="RadioButton">
-        <item name="android:textColor">@drawable/button_text_color</item>
-        <item name="android:minHeight">33dp</item>
-        <item name="android:minWidth">70dp</item>
-        <item name="android:gravity">center</item>
-        <item name="android:button">@null</item>
-        <item name="android:paddingLeft">5dp</item>
-        <item name="android:paddingRight">5dp</item>
-    </style>
-    <color name="radio_button_selected_color">@android:color/tab_indicator_text</color>
-    <dimen name="radio_button_conner_radius">5dp</dimen>
-    <dimen name="radio_button_stroke_border">1dp</dimen>
-
-    <declare-styleable name="SegmentedGroup">
-        <attr name="sc_corner_radius" format="dimension" />
-        <attr name="sc_border_width" format="dimension" />
-        <attr name="sc_tint_color" format="color" />
-        <attr name="sc_checked_text_color" format="color" />
-    </declare-styleable>
-
-</resources >