Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_fiveworld
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_fiveworld
Commits
98e429ed
Commit
98e429ed
authored
Jul 15, 2021
by
张释方
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.mints-id.com/android/android_street
into branche_zsf
parents
ae3ed87f
60d5b81b
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
780 additions
and
11 deletions
+780
-11
build.gradle
app/build.gradle
+2
-2
HistoryRecordAdapter.kt
...ain/java/com/mints/street/adapter/HistoryRecordAdapter.kt
+74
-0
PopularSceneAdapter.kt
...main/java/com/mints/street/adapter/PopularSceneAdapter.kt
+31
-0
PositioningBean.kt
app/src/main/java/com/mints/street/bean/PositioningBean.kt
+27
-0
HomeButtonItemVM.kt
.../main/java/com/mints/street/main/home/HomeButtonItemVM.kt
+8
-1
HomeFragment.kt
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
+32
-5
SearchAfterItem.kt
...c/main/java/com/mints/street/main/home/SearchAfterItem.kt
+11
-0
SearchMapActivity.kt
...main/java/com/mints/street/main/home/SearchMapActivity.kt
+163
-0
SearchMapViewModel.kt
...ain/java/com/mints/street/main/home/SearchMapViewModel.kt
+37
-0
PanoramicActivity.kt
...c/main/java/com/mints/street/main/vr/PanoramicActivity.kt
+5
-3
MintsWebViewActivity.kt
...ain/java/com/mints/street/webview/MintsWebViewActivity.kt
+16
-0
MintsWebViewModel.kt
...c/main/java/com/mints/street/webview/MintsWebViewModel.kt
+10
-0
cursor_bg_shape.xml
app/src/main/res/drawable/cursor_bg_shape.xml
+8
-0
cursor_color.xml
app/src/main/res/drawable/cursor_color.xml
+6
-0
search_map_radio_check.xml
app/src/main/res/drawable/search_map_radio_check.xml
+5
-0
search_map_radio_text_check.xml
app/src/main/res/drawable/search_map_radio_text_check.xml
+5
-0
activity_mints_web_view.xml
app/src/main/res/layout/activity_mints_web_view.xml
+22
-0
activity_search_map.xml
app/src/main/res/layout/activity_search_map.xml
+119
-0
item_history_record_adapter.xml
app/src/main/res/layout/item_history_record_adapter.xml
+56
-0
item_history_record_name.xml
app/src/main/res/layout/item_history_record_name.xml
+22
-0
item_home_button.xml
app/src/main/res/layout/item_home_button.xml
+1
-0
item_popular_scene_adapter.xml
app/src/main/res/layout/item_popular_scene_adapter.xml
+57
-0
item_search_after.xml
app/src/main/res/layout/item_search_after.xml
+62
-0
icon_search_history.png
app/src/main/res/mipmap-xxhdpi/icon_search_history.png
+0
-0
SPUtils.java
...abit/src/main/java/me/goldze/mvvmhabit/utils/SPUtils.java
+1
-0
No files found.
app/build.gradle
View file @
98e429ed
...
...
@@ -167,9 +167,9 @@ dependencies {
// 应用管理中心分包
implementation
(
name:
'humesdk-1.0.0'
,
ext:
'aar'
)
// umeng
implementation
'com.umeng.umsdk:common:9.
4.0
'
// 必选
implementation
'com.umeng.umsdk:common:9.
3.8
'
// 必选
implementation
'com.umeng.umsdk:asms:1.2.3'
// 必选
implementation
'com.umeng.umsdk:apm:1.
4.0
'
implementation
'com.umeng.umsdk:apm:1.
3.1
'
// 穿山甲 GroMore
// mediation_ad_sdk
implementation
(
name:
'mediation_ad_sdk_2.8.1.0'
,
ext:
'aar'
)
...
...
app/src/main/java/com/mints/street/adapter/HistoryRecordAdapter.kt
0 → 100644
View file @
98e429ed
package
com.mints.street.adapter
import
android.content.Context
import
android.text.TextUtils
import
androidx.databinding.ViewDataBinding
import
com.alibaba.android.vlayout.layout.LinearLayoutHelper
import
com.fry.base.adapter.AbstractVLayoutBaseAdapter
import
com.fry.base.adapter.BindingViewHolder
import
com.fry.base.recycler_view.VHMAdapter
import
com.fry.base.recycler_view.VHModel
import
com.google.gson.Gson
import
com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.databinding.ItemHistoryRecordAdapterBinding
import
com.mints.street.main.home.SearchMapActivity
import
me.goldze.mvvmhabit.utils.SPUtils
/**
* Created by 冯瑞雨 on 2021/7/14.
* 历史记录的adapter
*/
class
HistoryRecordAdapter
(
val
context
:
Context
,
var
name
:
String
?
=
null
)
:
AbstractVLayoutBaseAdapter
<
ItemHistoryRecordAdapterBinding
,
String
>(
context
,
name
,
1
)
{
var
listName
:
List
<
String
>?
=
getHistoryData
()
override
fun
onBindViewHolder
(
holder
:
BindingViewHolder
<
ItemHistoryRecordAdapterBinding
>,
position
:
Int
)
{
val
adapter
=
VHMAdapter
<
HistoryRecordItemVHM
>()
listName
?.
apply
{
for
(
items
in
this
)
{
adapter
.
add
(
HistoryRecordItemVHM
(
items
))
}
}
holder
.
binding
.
listView
.
adapter
=
adapter
}
private
fun
getHistoryData
():
List
<
String
>?
{
val
instance
=
SPUtils
.
getInstance
(
SearchMapActivity
.
HISTORY_NAME
)
val
string
=
instance
.
decodeString
(
"name"
)
if
(
TextUtils
.
isEmpty
(
string
)){
return
null
}
return
Gson
().
fromJson
<
List
<
String
>>(
string
,
List
::
class
.
java
)
}
fun
addHistoryData
(
list
:
List
<
String
>
)
{
val
instance
=
SPUtils
.
getInstance
(
SearchMapActivity
.
HISTORY_NAME
)
instance
.
encode
(
"name"
,
Gson
().
toJson
(
list
).
toString
())
}
override
fun
getItemCount
()
=
1
override
fun
onCreateLayoutHelper
()
=
LinearLayoutHelper
()
override
fun
getLayoutId
(
viewType
:
Int
)
=
R
.
layout
.
item_history_record_adapter
}
class
HistoryRecordItemVHM
(
var
name
:
String
)
:
VHModel
()
{
override
fun
getLayoutId
()
=
R
.
layout
.
item_history_record_name
override
fun
getVariableId
()
=
BR
.
vhm
override
fun
onBind
(
binding
:
ViewDataBinding
)
{
super
.
onBind
(
binding
)
}
}
\ No newline at end of file
app/src/main/java/com/mints/street/adapter/PopularSceneAdapter.kt
0 → 100644
View file @
98e429ed
package
com.mints.street.adapter
import
android.content.Context
import
com.alibaba.android.vlayout.layout.LinearLayoutHelper
import
com.fry.base.adapter.AbstractVLayoutBaseAdapter
import
com.fry.base.adapter.BindingViewHolder
import
com.mints.street.R
import
com.mints.street.databinding.ItemPopularSceneAdapterBinding
import
me.goldze.mvvmhabit.utils.KLog
/**
* Created by 冯瑞雨 on 2021/7/14.
* 热门景区的adapter
*/
class
PopularSceneAdapter
(
val
context
:
Context
,
var
list
:
List
<
String
>)
:
AbstractVLayoutBaseAdapter
<
ItemPopularSceneAdapterBinding
,
List
<
String
>>(
context
,
list
,
2
)
{
override
fun
onBindViewHolder
(
holder
:
BindingViewHolder
<
ItemPopularSceneAdapterBinding
>,
position
:
Int
)
{
KLog
.
e
(
"PopularSceneAdapter"
,
list
.
size
)
}
override
fun
getItemCount
()
=
list
.
size
override
fun
onCreateLayoutHelper
()
=
LinearLayoutHelper
()
override
fun
getLayoutId
(
viewType
:
Int
)
=
R
.
layout
.
item_popular_scene_adapter
}
app/src/main/java/com/mints/street/bean/PositioningBean.kt
0 → 100644
View file @
98e429ed
package
com.mints.street.bean
/**
* Created by 冯瑞雨 on 2021/7/15.
*/
class
PositioningBean
{
//纬度
var
latitude
:
Double
?=
0.0
//经度
var
longitude
:
Double
?=
0.0
// 国家码
var
countryCode
:
String
?=
null
//国家名称
var
country
:
String
?=
null
//获取省份
var
province
:
String
?=
null
//获取城市
var
city
:
String
?=
null
//获取区
var
district
:
String
?=
null
//获取镇信息
var
town
:
String
?=
null
//获取街道信息
var
street
:
String
?=
null
// 地址信息
var
addrStr
:
String
?=
null
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/home/HomeButtonItemVM.kt
View file @
98e429ed
package
com.mints.street.main.home
import
me.goldze.mvvmhabit.base.ItemViewModel
import
me.goldze.mvvmhabit.binding.command.BindingAction
import
me.goldze.mvvmhabit.binding.command.BindingCommand
/**
* Created by 冯瑞雨 on 2021/7/9.
*/
class
HomeButtonItemVM
(
viewModel
:
HomeViewModel
):
ItemViewModel
<
HomeViewModel
?
>(
viewModel
)
{
class
HomeButtonItemVM
(
viewModel
:
HomeViewModel
)
:
ItemViewModel
<
HomeViewModel
?
>(
viewModel
)
{
val
onItemClick
=
BindingCommand
<
Any
?>(
BindingAction
{
SearchMapActivity
.
startSearchMapActivity
()
})
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/home/HomeFragment.kt
View file @
98e429ed
...
...
@@ -20,12 +20,15 @@ import com.baidu.mapapi.search.core.RecommendStopInfo
import
com.baidu.mapapi.search.recommendstop.RecommendStopSearch
import
com.baidu.mapapi.search.recommendstop.RecommendStopSearchOption
import
com.fry.base.base.BaseFragment
import
com.google.gson.Gson
import
com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.bean.PositioningBean
import
com.mints.street.databinding.FragmentHomeBinding
import
me.goldze.mvvmhabit.base.AppManager
import
me.goldze.mvvmhabit.utils.KLog
import
me.goldze.mvvmhabit.utils.RxUtils
import
me.goldze.mvvmhabit.utils.SPUtils
/**
* Created by 冯瑞雨 on 2021/7/2.
...
...
@@ -100,21 +103,21 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
mBaiduMap
?.
setMapStatus
(
mapStatusUpdate
)
mBaiduMap
?.
setOnMapStatusChangeListener
(
object
:
BaiduMap
.
OnMapStatusChangeListener
{
override
fun
onMapStatusChangeStart
(
status
:
MapStatus
?)
{
KLog
.
a
(
"百度map"
,
"移动开始"
)
//
KLog.a("百度map", "移动开始")
}
override
fun
onMapStatusChangeStart
(
status
:
MapStatus
?,
reason
:
Int
)
{
KLog
.
a
(
"百度map"
,
"移动开始,两个参数"
)
//
KLog.a("百度map", "移动开始,两个参数")
}
override
fun
onMapStatusChange
(
status
:
MapStatus
?)
{
KLog
.
a
(
"百度map"
,
"移动改变"
)
//
KLog.a("百度map", "移动改变")
}
override
fun
onMapStatusChangeFinish
(
status
:
MapStatus
?)
{
KLog
.
a
(
"百度map"
,
"移动结束"
)
//
KLog.a("百度map", "移动结束")
mRecommendStopSearch
?.
requestRecommendStop
(
RecommendStopSearchOption
().
location
(
center
...
...
@@ -185,7 +188,11 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
option
.
isOpenGps
=
true
// 设置坐标类型
option
.
setCoorType
(
"bd09ll"
)
option
.
setScanSpan
(
1000
)
//可选,默认0,即仅定位一次,设置发起连续定位请求的间隔需要大于等于1000ms才是有效的
option
.
setScanSpan
(
100000
)
//十秒一次
option
.
setIsNeedAddress
(
true
)
// 可选,设置是否需要地址信息,默认不需要
option
.
setIsNeedLocationDescribe
(
true
)
// 可选,设置是否需要地址描述
mLocClient
?.
locOption
=
option
mLocClient
?.
start
()
}
...
...
@@ -244,8 +251,28 @@ class HomeFragment : BaseFragment<FragmentHomeBinding, HomeViewModel>(), SensorE
/**
* 定位SDK监听函数
*/
var
sp
:
SPUtils
?=
null
var
positioningBean
:
PositioningBean
?=
null
inner
class
MyLocationListener
:
BDLocationListener
{
override
fun
onReceiveLocation
(
location
:
BDLocation
)
{
if
(
sp
==
null
){
sp
=
SPUtils
.
getInstance
(
SPUtils
.
POSITIONING_MAP
)
}
if
(
positioningBean
==
null
){
positioningBean
=
PositioningBean
()
}
positioningBean
?.
latitude
=
location
.
latitude
positioningBean
?.
longitude
=
location
.
longitude
positioningBean
?.
countryCode
=
location
.
countryCode
positioningBean
?.
country
=
location
.
country
positioningBean
?.
province
=
location
.
province
positioningBean
?.
city
=
location
.
city
positioningBean
?.
district
=
location
.
district
positioningBean
?.
town
=
location
.
town
positioningBean
?.
street
=
location
.
street
positioningBean
?.
addrStr
=
location
.
addrStr
sp
?.
encode
(
SPUtils
.
POSITIONING_MAP
,
Gson
().
toJson
(
positioningBean
).
toString
())
// MapView 销毁后不在处理新接收的位置
mBaiduMap
?.
apply
{
mCurrentLat
=
location
.
latitude
...
...
app/src/main/java/com/mints/street/main/home/SearchAfterItem.kt
0 → 100644
View file @
98e429ed
package
com.mints.street.main.home
import
me.goldze.mvvmhabit.base.ItemViewModel
/**
* Created by 冯瑞雨 on 2021/7/15.
*/
class
SearchAfterItem
(
viewModel
:
SearchMapViewModel
,
val
name
:
String
?,
val
address
:
String
?)
:
ItemViewModel
<
SearchMapViewModel
>(
viewModel
)
{
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/home/SearchMapActivity.kt
0 → 100644
View file @
98e429ed
package
com.mints.street.main.home
import
android.content.Intent
import
android.os.Bundle
import
android.text.Editable
import
android.text.TextUtils
import
android.text.TextWatcher
import
com.alibaba.android.vlayout.DelegateAdapter
import
com.alibaba.android.vlayout.VirtualLayoutManager
import
com.baidu.mapapi.search.sug.OnGetSuggestionResultListener
import
com.baidu.mapapi.search.sug.SuggestionResult
import
com.baidu.mapapi.search.sug.SuggestionSearch
import
com.baidu.mapapi.search.sug.SuggestionSearchOption
import
com.fry.base.base.BaseActivity
import
com.fry.base.utils.ResourceUtils
import
com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.adapter.HistoryRecordAdapter
import
com.mints.street.adapter.PopularSceneAdapter
import
com.mints.street.databinding.ActivitySearchMapBinding
import
me.goldze.mvvmhabit.base.AppManager
import
me.goldze.mvvmhabit.utils.KLog
/**
* Created by 冯瑞雨 on 2021/7/13.
*/
class
SearchMapActivity
:
BaseActivity
<
ActivitySearchMapBinding
,
SearchMapViewModel
>(),
OnGetSuggestionResultListener
{
companion
object
{
const
val
HISTORY_NAME
=
"history_name"
fun
startSearchMapActivity
()
{
AppManager
.
getAppManager
().
currentActivity
?.
apply
{
this
.
startActivity
(
Intent
(
this
,
SearchMapActivity
::
class
.
java
))
}
}
}
private
var
vLayout
:
VirtualLayoutManager
?
=
null
private
var
mAdapter
:
DelegateAdapter
?
=
null
private
var
index
=
0
;
//0=境内 1=境外
private
var
historyRecordAdapter
:
HistoryRecordAdapter
?
=
null
private
var
popularSceneAdapter
:
PopularSceneAdapter
?
=
null
//检索模块
private
var
mSuggestionSearch
:
SuggestionSearch
?
=
null
override
fun
initContentView
(
savedInstanceState
:
Bundle
?)
=
R
.
layout
.
activity_search_map
override
fun
initVariableId
()
=
BR
.
viewModel
override
fun
initData
()
{
super
.
initData
()
//初始化布局管理器
vLayout
=
VirtualLayoutManager
(
this
)
mAdapter
=
DelegateAdapter
(
vLayout
,
false
)
binding
.
recyList
.
layoutManager
=
vLayout
binding
.
recyList
.
adapter
=
mAdapter
// 初始化建议搜索模块,注册建议搜索事件监听
mSuggestionSearch
=
SuggestionSearch
.
newInstance
()
mSuggestionSearch
?.
setOnGetSuggestionResultListener
(
this
)
binding
.
et
.
addTextChangedListener
(
object
:
TextWatcher
{
override
fun
beforeTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
count
:
Int
,
after
:
Int
)
{
}
override
fun
onTextChanged
(
s
:
CharSequence
?,
start
:
Int
,
before
:
Int
,
count
:
Int
)
{
}
override
fun
afterTextChanged
(
s
:
Editable
?)
{
if
(
TextUtils
.
isEmpty
(
s
))
{
viewModel
.
searchAfterOneItems
.
clear
()
return
}
// 使用建议搜索服务获取建议列表,结果在onSuggestionResult()中更新
mSuggestionSearch
?.
requestSuggestion
(
SuggestionSearchOption
()
.
keyword
(
s
.
toString
())
// 关键字
.
city
(
viewModel
.
positioningBean
?.
city
?:
"北京"
)
)
// 城市
}
})
historyRecordAdapter
=
HistoryRecordAdapter
(
this
)
popularSceneAdapter
=
PopularSceneAdapter
(
this
,
listOf
(
"1"
,
"12"
))
mAdapter
?.
addAdapter
(
historyRecordAdapter
)
mAdapter
?.
addAdapter
(
popularSceneAdapter
)
//境内
binding
.
territory
.
setOnClickListener
{
territory
()
}
//境外
binding
.
abroad
.
setOnClickListener
{
abroad
()
}
}
private
fun
update
()
{
mAdapter
?.
clear
()
if
(
index
==
0
)
{
historyRecordAdapter
?.
apply
{
mAdapter
?.
addAdapter
(
historyRecordAdapter
)
}
}
else
{
mAdapter
?.
removeAdapter
(
historyRecordAdapter
)
}
popularSceneAdapter
?.
apply
{
this
.
list
=
listOf
(
"1"
,
"12"
,
"dfdsfsd"
)
mAdapter
?.
addAdapter
(
popularSceneAdapter
)
}
mAdapter
?.
notifyDataSetChanged
()
}
private
fun
territory
()
{
if
(
index
==
0
)
return
index
=
0
binding
.
territory
.
setTextColor
(
ResourceUtils
.
getColor
(
R
.
color
.
blue
))
binding
.
abroad
.
setTextColor
(
ResourceUtils
.
getColor
(
R
.
color
.
white
))
binding
.
territory
.
solid
=
ResourceUtils
.
getColor
(
R
.
color
.
white
)
binding
.
abroad
.
solid
=
ResourceUtils
.
getColor
(
R
.
color
.
blue
)
update
()
}
private
fun
abroad
()
{
if
(
index
==
1
)
return
index
=
1
binding
.
territory
.
setTextColor
(
ResourceUtils
.
getColor
(
R
.
color
.
white
))
binding
.
abroad
.
setTextColor
(
ResourceUtils
.
getColor
(
R
.
color
.
blue
))
binding
.
territory
.
solid
=
ResourceUtils
.
getColor
(
R
.
color
.
blue
)
binding
.
abroad
.
solid
=
ResourceUtils
.
getColor
(
R
.
color
.
white
)
update
()
}
/**
* 获取在线建议搜索结果,得到requestSuggestion返回的搜索结果
*
* @param suggestionResult Sug检索结果
*/
override
fun
onGetSuggestionResult
(
suggestionResult
:
SuggestionResult
?)
{
if
(
suggestionResult
==
null
||
suggestionResult
.
allSuggestions
==
null
)
{
return
}
viewModel
.
searchAfterOneItems
.
clear
()
if
(
TextUtils
.
isEmpty
(
binding
.
et
.
text
)){
return
}
for
(
info
in
suggestionResult
.
allSuggestions
)
{
viewModel
.
searchAfterOneItems
.
add
(
SearchAfterItem
(
viewModel
,
info
.
key
,
info
.
address
))
}
}
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/home/SearchMapViewModel.kt
0 → 100644
View file @
98e429ed
package
com.mints.street.main.home
import
android.app.Application
import
android.text.TextUtils
import
android.view.View
import
androidx.databinding.ObservableArrayList
import
com.google.gson.Gson
import
com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.bean.PositioningBean
import
me.goldze.mvvmhabit.base.BaseViewModel
import
me.goldze.mvvmhabit.utils.SPUtils
import
me.tatarka.bindingcollectionadapter2.ItemBinding
/**
* Created by 冯瑞雨 on 2021/7/13.
*/
class
SearchMapViewModel
(
application
:
Application
)
:
BaseViewModel
(
application
)
{
val
searchAfterItemBinding
=
ItemBinding
.
of
<
SearchAfterItem
>(
BR
.
viewModel
,
R
.
layout
.
item_search_after
)
val
searchAfterOneItems
=
ObservableArrayList
<
SearchAfterItem
>()
//定位位置
val
positioningBean
:
PositioningBean
?
=
getpositioningMap
()
private
fun
getpositioningMap
():
PositioningBean
?{
SPUtils
.
getInstance
(
SPUtils
.
POSITIONING_MAP
)
.
decodeString
(
SPUtils
.
POSITIONING_MAP
)
?.
apply
{
if
(!
TextUtils
.
isEmpty
(
this
)){
return
Gson
().
fromJson
(
this
,
PositioningBean
::
class
.
java
)
}
}
return
null
}
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/vr/PanoramicActivity.kt
View file @
98e429ed
...
...
@@ -74,7 +74,7 @@ class PanoramicActivity : BaseActivity<ActivityPanoramicBinding, PanoramicViewMo
"请在AndoridManifest.xml中输入正确的授权Key,并检查您的网络连接是否正常!error: $iError"
)
}
else
{
KLog
.
a
(
"BMapManager"
,
"key认证成功"
)
KLog
.
i
(
"BMapManager"
,
"key认证成功"
)
}
}
}
...
...
@@ -148,6 +148,8 @@ class PanoramicActivity : BaseActivity<ActivityPanoramicBinding, PanoramicViewMo
}
override
fun
onLoadPanoramaError
(
p0
:
String
?)
{
KLog
.
i
(
"PanoramicActivity"
,
"onLoadPanoramaError...$p0"
)
}
override
fun
onMessage
(
p0
:
String
?,
p1
:
Int
)
{
...
...
@@ -200,9 +202,9 @@ class PanoramicActivity : BaseActivity<ActivityPanoramicBinding, PanoramicViewMo
return
}
binding
.
panorama
.
setPanoramaImageLevel
(
PanoramaView
.
ImageDefinition
.
ImageDefinition
Middle
PanoramaView
.
ImageDefinition
.
ImageDefinition
Low
)
binding
.
panorama
.
setPanorama
(
lon
,
lat
,
PanoramaView
.
COORDTYPE_BD09LL
)
binding
.
panorama
.
setPanorama
(
lon
,
lat
)
}
//通过百度墨卡托坐标(BD09MC)获取全景
MERCATOR
->
{
...
...
app/src/main/java/com/mints/street/webview/MintsWebViewActivity.kt
0 → 100644
View file @
98e429ed
package
com.mints.street.webview
import
android.os.Bundle
import
com.fry.base.base.BaseActivity
import
com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.databinding.ActivityMintsWebViewBinding
/**
* Created by 冯瑞雨 on 2021/7/15.
*/
class
MintsWebViewActivity
:
BaseActivity
<
ActivityMintsWebViewBinding
,
MintsWebViewModel
>()
{
override
fun
initContentView
(
savedInstanceState
:
Bundle
?)
=
R
.
layout
.
activity_mints_web_view
override
fun
initVariableId
()
=
BR
.
viewModel
}
\ No newline at end of file
app/src/main/java/com/mints/street/webview/MintsWebViewModel.kt
0 → 100644
View file @
98e429ed
package
com.mints.street.webview
import
android.app.Application
import
me.goldze.mvvmhabit.base.BaseViewModel
/**
* Created by 冯瑞雨 on 2021/7/15.
*/
class
MintsWebViewModel
(
application
:
Application
):
BaseViewModel
(
application
)
{
}
\ No newline at end of file
app/src/main/res/drawable/cursor_bg_shape.xml
0 → 100644
View file @
98e429ed
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<!-- 边框的颜色和粗细 -->
<solid
android:color=
"#ffffffff"
/>
<corners
android:radius=
"81dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/cursor_color.xml
0 → 100644
View file @
98e429ed
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"#00bb9c"
/>
<size
android:width=
"1dp"
/>
</shape>
app/src/main/res/drawable/search_map_radio_check.xml
0 → 100644
View file @
98e429ed
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@drawable/shape_gold_card"
android:state_checked=
"true"
/>
<item
android:drawable=
"@drawable/shape_gold"
android:state_checked=
"false"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/search_map_radio_text_check.xml
0 → 100644
View file @
98e429ed
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_checked=
"false"
android:drawable=
"@color/blue"
/>
<item
android:state_checked=
"true"
android:drawable=
"@color/black"
/>
</selector>
\ No newline at end of file
app/src/main/res/layout/activity_mints_web_view.xml
0 → 100644
View file @
98e429ed
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<variable
name=
"viewModel"
type=
"com.mints.street.webview.MintsWebViewModel"
/>
</data>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<com.fry.base.ui.widget.CommonTitleBar
android:id=
"@+id/ctb_title"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:ctb_theme=
"dark"
app:layout_constraintTop_toTopOf=
"parent"
/>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/activity_search_map.xml
0 → 100644
View file @
98e429ed
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<View
android:id=
"@+id/view_bg"
android:layout_width=
"match_parent"
android:layout_height=
"150dp"
android:background=
"@color/color_8F6D21"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<LinearLayout
android:id=
"@+id/ll_title_bg"
android:layout_width=
"120dp"
android:layout_height=
"30dp"
android:gravity=
"center"
app:layout_constraintBottom_toBottomOf=
"@id/ctb_title"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"@id/ctb_title"
>
<com.coorchice.library.SuperTextView
android:id=
"@+id/territory"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"境内"
android:textColor=
"@color/blue"
android:textSize=
"14sp"
app:stv_corner=
"5dp"
app:stv_left_bottom_corner=
"true"
app:stv_left_top_corner=
"true"
app:stv_solid=
"@color/white"
app:stv_stroke_color=
"@color/white"
app:stv_stroke_width=
"1dp"
/>
<com.coorchice.library.SuperTextView
android:id=
"@+id/abroad"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"境外"
android:textColor=
"@color/white"
android:textSize=
"14sp"
app:stv_corner=
"5dp"
app:stv_right_bottom_corner=
"true"
app:stv_right_top_corner=
"true"
app:stv_solid=
"@color/blue"
app:stv_stroke_color=
"@color/white"
app:stv_stroke_width=
"1dp"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/recy_list"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:paddingTop=
"30dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/view_bg"
/>
<EditText
android:id=
"@+id/et"
android:paddingStart=
"10dp"
android:paddingEnd=
"10dp"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_marginEnd=
"20dp"
android:layout_marginStart=
"20dp"
android:background=
"@drawable/cursor_bg_shape"
android:gravity=
"center_vertical"
android:hint=
"请输入地址"
android:textColor=
"@color/color_8F6D21"
android:textCursorDrawable=
"@drawable/cursor_color"
android:textSize=
"14sp"
app:layout_constraintBottom_toBottomOf=
"@id/view_bg"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/view_bg"
/>
<com.fry.base.ui.widget.CommonTitleBar
android:id=
"@+id/ctb_title"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:ctb_theme=
"dark"
app:layout_constraintTop_toTopOf=
"parent"
/>
<com.fry.base.ui.widget.CustomRecycleView
android:background=
"@color/white"
android:id=
"@+id/recy_after_search"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/et"
app:itemBinding=
"@{viewModel.searchAfterItemBinding}"
app:items=
"@{viewModel.searchAfterOneItems}"
android:visibility=
"@{viewModel.searchAfterOneItems.size() == 0 ? view.GONE:view.VISIBLE}"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<data>
<variable
name=
"viewModel"
type=
"com.mints.street.main.home.SearchMapViewModel"
/>
<variable
name=
"view"
type=
"android.view.View"
/>
</data>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_history_record_adapter.xml
0 → 100644
View file @
98e429ed
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<variable
name=
"adpter"
type=
"com.mints.street.adapter.HistoryRecordAdapter"
/>
</data>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:gravity=
"center_vertical"
>
<ImageView
android:padding=
"10dp"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/icon_search_history"
/>
<TextView
android:layout_weight=
"1"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:text=
"历史记录"
android:textColor=
"@color/black"
android:textStyle=
"bold"
android:textSize=
"14sp"
/>
<TextView
android:padding=
"10dp"
android:drawableStart=
"@mipmap/icon_search_history"
android:drawablePadding=
"5dp"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"清空"
android:textColor=
"@color/color_555"
android:textSize=
"12sp"
/>
</LinearLayout>
<com.fry.base.ui.widget.CustomRecycleView
android:id=
"@+id/list_view"
app:dividerColor=
"#00000000"
app:dividerHeight=
"10dp"
app:dividerMarginEnd=
"10dp"
app:layoutManagerType=
"flow"
app:useDivider=
"true"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_history_record_name.xml
0 → 100644
View file @
98e429ed
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<variable
name=
"vhm"
type=
"com.mints.street.adapter.HistoryRecordItemVHM"
/>
</data>
<com.coorchice.library.SuperTextView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"wrap_content"
android:layout_height=
"20dp"
android:textSize=
"14sp"
android:gravity=
"center"
android:text=
"@{vhm.name}"
android:textColor=
"@color/color_555"
app:stv_stroke_color=
"@color/color_555"
app:stv_stroke_width=
"1dp"
app:stv_corner=
"10dp"
android:paddingStart=
"5dp"
android:paddingEnd=
"5dp"
/>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_home_button.xml
View file @
98e429ed
...
...
@@ -12,6 +12,7 @@
android:layout_height=
"120dp"
android:background=
"@mipmap/abc_popup_background_mtrl_mult"
android:padding=
"15dp"
app:onClickCommand=
"@{viewModel.onItemClick}"
>
<TextView
...
...
app/src/main/res/layout/item_popular_scene_adapter.xml
0 → 100644
View file @
98e429ed
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/bg"
android:layout_width=
"match_parent"
android:layout_height=
"140dp"
android:background=
"@mipmap/vip_google_bg"
android:layout_marginStart=
"5dp"
android:layout_marginEnd=
"5dp"
android:padding=
"10dp"
>
<TextView
android:id=
"@+id/tv_name"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"测试"
android:textColor=
"@color/black"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<ImageView
android:id=
"@+id/image1"
android:layout_width=
"0dp"
android:layout_height=
"80dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@id/image2"
android:src=
"@mipmap/bg_fl"
/>
<ImageView
android:layout_marginStart=
"10dp"
android:id=
"@+id/image2"
android:layout_width=
"0dp"
android:layout_height=
"80dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/image1"
app:layout_constraintEnd_toStartOf=
"@id/image3"
android:src=
"@mipmap/bg_fl"
/>
<ImageView
android:layout_marginStart=
"10dp"
android:id=
"@+id/image3"
android:layout_width=
"0dp"
android:layout_height=
"80dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/image2"
app:layout_constraintEnd_toEndOf=
"parent"
android:src=
"@mipmap/bg_fl"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_search_after.xml
0 → 100644
View file @
98e429ed
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"50dp"
android:layout_marginBottom=
"10dp"
>
<ImageView
android:id=
"@+id/image"
android:layout_width=
"wrap_content"
android:layout_height=
"50dp"
android:src=
"@mipmap/map_history_icon"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:text=
"@{viewModel.name}"
android:textColor=
"@color/color_555"
android:textSize=
"14sp"
android:maxLines=
"1"
android:singleLine=
"true"
app:layout_constraintBottom_toTopOf=
"@id/tv_address"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/image"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_address"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:singleLine=
"true"
android:text=
"@{viewModel.address}"
android:textColor=
"@color/color_555"
android:textSize=
"10sp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/image"
app:layout_constraintTop_toBottomOf=
"@id/tv_name"
/>
<View
android:layout_width=
"0dp"
android:layout_height=
"0.5dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/image"
android:background=
"@color/color_555"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<data>
<variable
name=
"viewModel"
type=
"com.mints.street.main.home.SearchAfterItem"
/>
</data>
</layout>
\ No newline at end of file
app/src/main/res/mipmap-xxhdpi/icon_search_history.png
0 → 100644
View file @
98e429ed
2.18 KB
mvvmhabit/src/main/java/me/goldze/mvvmhabit/utils/SPUtils.java
View file @
98e429ed
...
...
@@ -21,6 +21,7 @@ public final class SPUtils {
private
static
Map
<
String
,
SPUtils
>
sSPMap
=
new
HashMap
<>();
private
static
final
String
DEFAULT_KEY
=
"spUtils"
;
public
static
final
String
POSITIONING_MAP
=
"positioningMap"
;
private
MMKV
mv
;
public
static
void
init
(
Application
application
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment