Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_street
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_street
Commits
ee9f7189
Commit
ee9f7189
authored
Jul 30, 2021
by
张释方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交精选体验以及进入目的地接口
parent
c0644d67
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
128 additions
and
85 deletions
+128
-85
EnterDestinationAdapter.kt
.../java/com/mints/street/adapter/EnterDestinationAdapter.kt
+4
-16
GridVrMapAdapter.kt
...rc/main/java/com/mints/street/adapter/GridVrMapAdapter.kt
+11
-2
ItemEnterDestinationAdapter.kt
...a/com/mints/street/adapter/ItemEnterDestinationAdapter.kt
+15
-9
MainApi.kt
app/src/main/java/com/mints/street/api/MainApi.kt
+2
-2
BaseArrayResponse.java
...rc/main/java/com/mints/street/bean/BaseArrayResponse.java
+10
-3
BaseResponse.java
app/src/main/java/com/mints/street/bean/BaseResponse.java
+1
-1
DetailedBean.kt
app/src/main/java/com/mints/street/bean/DetailedBean.kt
+16
-0
VrexperienceBean.kt
app/src/main/java/com/mints/street/bean/VrexperienceBean.kt
+13
-0
MainActivity.kt
app/src/main/java/com/mints/street/main/MainActivity.kt
+3
-0
DetailedActivity.kt
...rc/main/java/com/mints/street/main/vr/DetailedActivity.kt
+15
-24
DetailedViewModel.kt
...c/main/java/com/mints/street/main/vr/DetailedViewModel.kt
+11
-4
FeaturedExperienceFragment.kt
...va/com/mints/street/main/vr/FeaturedExperienceFragment.kt
+3
-5
FeaturedExperienceViewModel.kt
...a/com/mints/street/main/vr/FeaturedExperienceViewModel.kt
+9
-5
FreeZoneFragment.kt
...rc/main/java/com/mints/street/main/vr/FreeZoneFragment.kt
+1
-1
ApiModel.kt
app/src/main/java/com/mints/street/model/ApiModel.kt
+2
-2
activity_detailed.xml
app/src/main/res/layout/activity_detailed.xml
+2
-0
item_enter_destination_adapter.xml
app/src/main/res/layout/item_enter_destination_adapter.xml
+10
-11
No files found.
app/src/main/java/com/mints/street/adapter/EnterDestinationAdapter.kt
View file @
ee9f7189
package
com.mints.street.adapter
import
android.content.Context
import
android.content.Intent
import
android.view.View
import
androidx.core.content.ContextCompat.startActivity
import
androidx.databinding.ObservableArrayList
import
androidx.databinding.ObservableList
import
androidx.databinding.ViewDataBinding
import
com.alibaba.android.vlayout.DelegateAdapter
import
com.alibaba.android.vlayout.VirtualLayoutManager
import
com.alibaba.android.vlayout.layout.GridLayoutHelper
import
com.alibaba.android.vlayout.layout.LinearLayoutHelper
import
com.fry.base.adapter.AbstractVLayoutBaseAdapter
import
com.fry.base.adapter.BindingViewHolder
import
com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.bean.VreperienceBean
import
com.mints.street.bean.VrmapBean
import
com.mints.street.databinding.EnterDestinationAdapterBinding
import
com.mints.street.main.vr.DetailedActivity
import
com.mints.street.main.vr.FreeZoneViewModel
import
com.mints.street.webview.MintsWebViewActivity
import
me.tatarka.bindingcollectionadapter2.BindingRecyclerViewAdapter
import
me.tatarka.bindingcollectionadapter2.ItemBinding
/**
* Created by 冯瑞雨 on 2021/7/9.
*/
class
EnterDestinationAdapter
(
val
context
:
Context
,
val
bean
:
List
<
Vr
mapBean
.
Abroad
>?):
AbstractVLayoutBaseAdapter
<
EnterDestinationAdapterBinding
,
List
<
Vr
mapBean
.
Abroad
>?>(
context
,
bean
,
1
)
{
class
EnterDestinationAdapter
(
val
context
:
Context
,
val
bean
:
List
<
Vr
eperienceBean
.
Data
>?):
AbstractVLayoutBaseAdapter
<
EnterDestinationAdapterBinding
,
List
<
Vr
eperienceBean
.
Data
>?>(
context
,
bean
,
1
)
{
private
var
vLayout
:
VirtualLayoutManager
?
=
null
...
...
@@ -42,7 +30,7 @@ class EnterDestinationAdapter(val context: Context,val bean :List<VrmapBean.Abro
holder
.
binding
.
listView
.
layoutManager
=
vLayout
holder
.
binding
.
listView
.
adapter
=
mAdapter
mAdapter
?.
addAdapter
(
ItemEnterDestinationAdapter
(
context
,
true
,
bean
))
mAdapter
?.
addAdapter
(
ItemEnterDestinationAdapter
(
context
,
true
,
bean
!!
))
}
...
...
app/src/main/java/com/mints/street/adapter/GridVrMapAdapter.kt
View file @
ee9f7189
...
...
@@ -11,12 +11,14 @@ import com.alibaba.android.vlayout.layout.GridLayoutHelper
import
com.fry.base.adapter.AbstractVLayoutBaseAdapter
import
com.fry.base.adapter.BindingViewHolder
import
com.fry.base.binding.setMargin
import
com.fry.base.utils.ImageLoader
import
com.mints.street.R
import
com.mints.street.bean.DetailedBean
import
com.mints.street.databinding.ItemGridVrmapAdapterBinding
import
me.goldze.mvvmhabit.utils.AppUtils
class
GridVrMapAdapter
(
val
context
:
Context
,
var
list
:
List
<
String
>?)
:
AbstractVLayoutBaseAdapter
<
ItemGridVrmapAdapterBinding
,
List
<
String
>>(
context
,
list
,
2
)
{
class
GridVrMapAdapter
(
val
context
:
Context
,
var
list
:
List
<
DetailedBean
.
DetailedItemBean
>?)
:
AbstractVLayoutBaseAdapter
<
ItemGridVrmapAdapterBinding
,
List
<
DetailedBean
.
DetailedItemBean
>>(
context
,
list
,
2
)
{
override
fun
onBindViewHolder
(
holder
:
BindingViewHolder
<
ItemGridVrmapAdapterBinding
>,
position
:
Int
...
...
@@ -31,6 +33,13 @@ class GridVrMapAdapter(val context: Context, var list: List<String>?) :
holder
.
binding
.
bg
.
setMargin
(
AppUtils
.
dp2Px
(
context
,
6F
),
AppUtils
.
dp2Px
(
context
,
10F
),
AppUtils
.
dp2Px
(
context
,
10F
),
0
,
null
,
null
,
null
)
}
list
?.
let
{
it
->
holder
.
binding
.
tvName
.
text
=
it
[
position
].
name
ImageLoader
.
ImageBuilder
.
with
(
context
)
.
setUrl
(
it
[
position
].
img
).
setTargetView
(
holder
.
binding
.
image
).
start
()
}
}
override
fun
getItemCount
()
=
list
!!
.
size
...
...
app/src/main/java/com/mints/street/adapter/ItemEnterDestinationAdapter.kt
View file @
ee9f7189
...
...
@@ -7,9 +7,11 @@ import com.fry.base.adapter.AbstractVLayoutBaseAdapter
import
com.fry.base.adapter.BindingViewHolder
import
com.fry.base.utils.ImageLoader
import
com.mints.street.R
import
com.mints.street.bean.Vr
map
Bean
import
com.mints.street.bean.Vr
eperience
Bean
import
com.mints.street.databinding.ItemEnterDestinationAdapterBinding
import
com.mints.street.main.vr.DetailedActivity
import
me.goldze.mvvmhabit.utils.KLog
import
me.goldze.mvvmhabit.utils.RxUtils
/**
...
...
@@ -19,8 +21,8 @@ import com.mints.street.main.vr.DetailedActivity
class
ItemEnterDestinationAdapter
(
val
context
:
Context
,
private
val
isMultipleLayout
:
Boolean
,
var
list
:
List
<
Vr
mapBean
.
Abroad
>?
)
:
AbstractVLayoutBaseAdapter
<
ItemEnterDestinationAdapterBinding
,
List
<
Vr
mapBean
.
Abroad
>?>(
var
list
:
List
<
Vr
eperienceBean
.
Data
>?
)
:
AbstractVLayoutBaseAdapter
<
ItemEnterDestinationAdapterBinding
,
List
<
Vr
eperienceBean
.
Data
>?>(
context
,
list
,
1
...
...
@@ -36,19 +38,23 @@ class ItemEnterDestinationAdapter(
}
else
{
bgLayoutParams
.
width
=
a
.
widthPixels
}
holder
.
itemView
.
setOnClickListener
{
RxUtils
.
onMultiClick
(
holder
.
itemView
){
var
intent
=
Intent
(
context
,
DetailedActivity
::
class
.
java
)
intent
.
putExtra
(
"area"
,
list
?.
get
(
position
)
?.
area
)
context
.
startActivity
(
intent
)
}
list
?.
let
{
it
->
holder
.
binding
.
tvName
.
text
=
it
[
position
].
name
holder
.
binding
.
tvName
.
text
=
it
[
position
].
area
holder
.
binding
.
tvNumberPeople
.
text
=
"人数"
it
[
position
].
img
?.
let
{
url
->
for
(
index
in
it
.
indices
)
{
it
[
position
].
url
?.
let
{
url
->
KLog
.
e
(
"zsf__"
,
"==========${it.indices}"
)
for
(
index
in
0
..
2
)
{
when
(
index
)
{
0
->
{
ImageLoader
.
ImageBuilder
.
with
(
context
)
.
setUrl
(
url
[
index
]).
setTargetView
(
holder
.
binding
.
image
1
).
start
()
.
setUrl
(
url
[
index
]).
setTargetView
(
holder
.
binding
.
image
3
).
start
()
}
1
->
{
ImageLoader
.
ImageBuilder
.
with
(
context
)
...
...
@@ -56,7 +62,7 @@ class ItemEnterDestinationAdapter(
}
2
->
{
ImageLoader
.
ImageBuilder
.
with
(
context
)
.
setUrl
(
url
[
index
]).
setTargetView
(
holder
.
binding
.
image
3
).
start
()
.
setUrl
(
url
[
index
]).
setTargetView
(
holder
.
binding
.
image
1
).
start
()
}
}
...
...
app/src/main/java/com/mints/street/api/MainApi.kt
View file @
ee9f7189
...
...
@@ -122,12 +122,12 @@ interface MainApi {
* 精选体验展示图
*/
@POST
(
"na/getChooseExperienceHeadData"
)
fun
getChooseExperienceHeadData
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>
fun
getChooseExperienceHeadData
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
VreperienceBean
>>>
/**
* 精选体验详情
*/
@POST
(
"na/getChooseExperienceData"
)
fun
getChooseExperienceData
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>
fun
getChooseExperienceData
(
@Body
vo
:
@JvmSuppressWildcards
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
DetailedBean
>>>
}
\ No newline at end of file
app/src/main/java/com/mints/street/bean/BaseArrayResponse.java
View file @
ee9f7189
...
...
@@ -6,9 +6,16 @@ import java.util.List;
* Created by goldze on 2017/5/10.
* 该类仅供参考,实际业务返回的固定字段, 根据需求来定义,
*/
public
class
BaseArrayResponse
<
T
>
{
public
class
BaseArrayResponse
<
T
>
extends
BaseResponse
<
List
<
T
>>
{
@Override
public
List
<
T
>
getResult
()
{
return
result
;
}
@Override
public
void
setResult
(
List
<
T
>
result
)
{
this
.
result
=
result
;
}
}
}
app/src/main/java/com/mints/street/bean/BaseResponse.java
View file @
ee9f7189
...
...
@@ -18,7 +18,7 @@ public class BaseResponse<T> implements Serializable {
// @JsonAdapter(value = JsonAdapterGsonDeserializer.class)
@SerializedName
(
"data"
)
pr
ivate
@Nullable
T
result
;
pr
otected
@Nullable
T
result
;
@SerializedName
(
"result"
)
private
@Nullable
List
<
T
>
resultList
;
...
...
app/src/main/java/com/mints/street/bean/DetailedBean.kt
0 → 100644
View file @
ee9f7189
package
com.mints.street.bean
import
java.io.Serializable
class
DetailedBean
:
Serializable
{
val
desc
:
String
?=
null
val
list
:
List
<
DetailedItemBean
>?=
null
inner
class
DetailedItemBean
:
Serializable
{
val
img
:
String
?=
null
val
lat
:
Double
=
0.0
val
lng
:
Double
=
0.0
val
name
:
String
?=
null
}
}
app/src/main/java/com/mints/street/bean/VrexperienceBean.kt
0 → 100644
View file @
ee9f7189
package
com.mints.street.bean
import
java.io.Serializable
class
VreperienceBean
:
Serializable
{
val
data
:
List
<
Data
>?=
null
inner
class
Data
(
val
area
:
String
,
val
url
:
List
<
String
>
)
}
app/src/main/java/com/mints/street/main/MainActivity.kt
View file @
ee9f7189
...
...
@@ -21,8 +21,10 @@ import com.mints.street.main.home.HomeFragment
import
com.mints.street.main.my.MyFragment
import
com.mints.street.main.vr.VRFragment
import
com.mints.street.manager.oaid.OaidManager
import
com.mints.street.utils.encry.AESUtils
import
com.tbruyelle.rxpermissions2.RxPermissions
import
me.goldze.mvvmhabit.base.AppManager
import
me.goldze.mvvmhabit.utils.KLog
import
me.goldze.mvvmhabit.utils.ToastUtils
...
...
@@ -77,6 +79,7 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
)
.
subscribe
{
}
}
...
...
app/src/main/java/com/mints/street/main/vr/DetailedActivity.kt
View file @
ee9f7189
package
com.mints.street.main.vr
import
android.content.Intent
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
import
android.view.View
import
android.widget.TextView
import
androidx.lifecycle.Observer
import
com.alibaba.android.vlayout.DelegateAdapter
import
com.alibaba.android.vlayout.VirtualLayoutManager
import
com.fry.base.base.BaseActivity
import
com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.adapter.GridMapAdapter
import
com.mints.street.adapter.GridVrMapAdapter
import
com.mints.street.adapter.ItemEnterDestinationAdapter
import
com.mints.street.databinding.ActivityDetailedBinding
import
com.mints.street.databinding.ActivityMoresettingsBinding
import
com.mints.street.main.my.MoresettingsViewModel
import
kotlinx.android.synthetic.main.activity_detailed.*
import
me.goldze.mvvmhabit.utils.KLog
import
me.goldze.mvvmhabit.utils.systembar.StatusBarUtil
class
DetailedActivity
:
BaseActivity
<
ActivityDetailedBinding
,
DetailedViewModel
>(),
View
.
OnClickListener
{
override
fun
initVariableId
()
=
BR
.
viewModel
override
fun
initContentView
(
savedInstanceState
:
Bundle
?)
=
R
.
layout
.
activity_detailed
private
var
myintent
:
Intent
?
=
null
private
var
vLayout
:
VirtualLayoutManager
?
=
null
private
var
mAdapter
:
DelegateAdapter
?
=
null
private
var
gridVrMapAdapter
:
GridVrMapAdapter
?
=
null
...
...
@@ -48,13 +44,6 @@ class DetailedActivity : BaseActivity<ActivityDetailedBinding, DetailedViewModel
binding
.
listview
.
layoutManager
=
vLayout
binding
.
listview
.
adapter
=
mAdapter
if
(
gridVrMapAdapter
==
null
)
{
gridVrMapAdapter
=
GridVrMapAdapter
(
this
,
listOf
(
"1"
,
"2"
,
"3"
,
"1"
,
"2"
,
"3"
,
"1"
,
"2"
,
"3"
,
"1"
,
"2"
,
"3"
,
"1"
,
"2"
,
"3"
))
KLog
.
e
(
"aaa"
,
"${this.window.decorView.width.toFloat()}"
)
mAdapter
?.
addAdapter
(
gridVrMapAdapter
)
mAdapter
?.
notifyDataSetChanged
()
}
}
...
...
@@ -64,19 +53,21 @@ class DetailedActivity : BaseActivity<ActivityDetailedBinding, DetailedViewModel
override
fun
onResume
()
{
super
.
onResume
()
viewModel
.
getChooseExperienceData
()
myintent
=
getIntent
();
viewModel
.
getChooseExperienceData
(
myintent
?.
getStringExtra
(
"area"
)
!!
)
}
override
fun
initViewObservable
()
{
super
.
initViewObservable
()
// viewModel.VrmapBean.observe(this, Observer {
//// mAdapter?.addAdapter(ItemEnterDestinationAdapter(context!!, false,it.abroad))
// if (gridVrMapAdapter == null){
// gridVrMapAdapter = ItemEnterDestinationAdapter(context!!, false,it.abroad)
// mAdapter?.addAdapter(gridVrMapAdapter)
// }
// gridVrMapAdapter?.list = it.abroad
// mAdapter?.notifyDataSetChanged()
// })
viewModel
.
detailbean
.
observe
(
this
,
Observer
{
if
(
gridVrMapAdapter
==
null
){
gridVrMapAdapter
=
GridVrMapAdapter
(
this
,
it
.
list
)
mAdapter
?.
addAdapter
(
gridVrMapAdapter
)
}
gridVrMapAdapter
?.
list
=
it
.
list
mAdapter
?.
notifyDataSetChanged
()
binding
.
tvIntroduce
.
text
=
it
.
desc
binding
.
tvName
.
text
=
myintent
?.
getStringExtra
(
"area"
)
!!
})
}
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/vr/DetailedViewModel.kt
View file @
ee9f7189
package
com.mints.street.main.vr
import
android.app.Application
import
androidx.lifecycle.MutableLiveData
import
com.mints.street.bean.BaseResponse
import
com.mints.street.bean.DetailedBean
import
com.mints.street.bean.VipBean
import
com.mints.street.model.ApiModel
import
com.mints.street.netwrok.base.HttpSubscribeImpl
import
me.goldze.mvvmhabit.base.BaseViewModel
...
...
@@ -9,13 +12,17 @@ import me.goldze.mvvmhabit.utils.KLog
import
java.util.HashMap
class
DetailedViewModel
(
application
:
Application
)
:
BaseViewModel
(
application
)
{
fun
getChooseExperienceData
(){
val
detailbean
:
MutableLiveData
<
DetailedBean
>
=
MutableLiveData
()
fun
getChooseExperienceData
(
name
:
String
){
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"area"
]
=
"北京"
vo
[
"area"
]
=
name
ApiModel
.
getChooseExperienceData
(
lifecycleProvider
,
vo
).
safeSubscribe
(
object
:
HttpSubscribeImpl
<
BaseResponse
<
Any
>>(
object
:
HttpSubscribeImpl
<
BaseResponse
<
DetailedBean
>>(
this
@DetailedViewModel
,
true
){
override
fun
onBusinessSuccess
(
response
:
BaseResponse
<
Any
>)
{
override
fun
onBusinessSuccess
(
response
:
BaseResponse
<
DetailedBean
>)
{
detailbean
.
value
=
response
.
result
KLog
.
e
(
"getChooseExperienceData"
,
"成功================="
)
}
...
...
app/src/main/java/com/mints/street/main/vr/FeaturedExperienceFragment.kt
View file @
ee9f7189
...
...
@@ -9,8 +9,6 @@ import com.alibaba.android.vlayout.VirtualLayoutManager
import
com.fry.base.base.BaseFragment
import
com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.adapter.EnterDestinationAdapter
import
com.mints.street.adapter.GridMapAdapter
import
com.mints.street.adapter.ItemEnterDestinationAdapter
import
com.mints.street.databinding.FragmentFeaturedExperienceBinding
...
...
@@ -45,13 +43,13 @@ class FeaturedExperienceFragment:BaseFragment<FragmentFeaturedExperienceBinding
override
fun
initViewObservable
()
{
super
.
initViewObservable
()
viewModel
.
Vr
map
Bean
.
observe
(
this
,
Observer
{
viewModel
.
Vr
eperience
Bean
.
observe
(
this
,
Observer
{
// mAdapter?.addAdapter(ItemEnterDestinationAdapter(context!!, false,it.abroad))
if
(
itemEnterDestinationAdapter
==
null
){
itemEnterDestinationAdapter
=
ItemEnterDestinationAdapter
(
context
!!
,
false
,
it
.
abroad
)
itemEnterDestinationAdapter
=
ItemEnterDestinationAdapter
(
context
!!
,
false
,
it
.
data
)
mAdapter
?.
addAdapter
(
itemEnterDestinationAdapter
)
}
itemEnterDestinationAdapter
?.
list
=
it
.
abroad
itemEnterDestinationAdapter
?.
list
=
it
.
data
!!
mAdapter
?.
notifyDataSetChanged
()
})
}
...
...
app/src/main/java/com/mints/street/main/vr/FeaturedExperienceViewModel.kt
View file @
ee9f7189
...
...
@@ -2,7 +2,9 @@ package com.mints.street.main.vr
import
android.app.Application
import
androidx.lifecycle.MutableLiveData
import
com.mints.street.bean.BaseArrayResponse
import
com.mints.street.bean.BaseResponse
import
com.mints.street.bean.VreperienceBean
import
com.mints.street.bean.VrmapBean
import
com.mints.street.db.ScenicSpotBean
import
com.mints.street.model.ApiModel
...
...
@@ -15,8 +17,10 @@ import java.util.HashMap
* Created by 冯瑞雨 on 2021/7/9.
*/
class
FeaturedExperienceViewModel
(
application
:
Application
):
BaseViewModel
(
application
)
{
//获取vr街景数据
//获取vr
详细
街景数据
val
VrmapBean
:
MutableLiveData
<
VrmapBean
>
=
MutableLiveData
()
val
VreperienceBean
:
MutableLiveData
<
VreperienceBean
>
=
MutableLiveData
()
fun
vrPlaces
(){
//无参数传递
ApiModel
.
vrPlaces
(
lifecycleProvider
).
safeSubscribe
(
object
:
HttpSubscribeImpl
<
BaseResponse
<
VrmapBean
>>(
...
...
@@ -43,16 +47,16 @@ class FeaturedExperienceViewModel(application: Application):BaseViewModel(applic
fun
getChooseExperienceHeadData
(){
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"pageNum"
]
=
1
vo
[
"pageSize"
]
=
2
vo
[
"pageSize"
]
=
320
ApiModel
.
getChooseExperienceHeadData
(
lifecycleProvider
,
vo
).
safeSubscribe
(
object
:
HttpSubscribeImpl
<
BaseResponse
<
Any
>>(
object
:
HttpSubscribeImpl
<
BaseResponse
<
VreperienceBean
>>(
this
@FeaturedExperienceViewModel
,
true
){
override
fun
onBusinessSuccess
(
response
:
BaseResponse
<
Any
>)
{
override
fun
onBusinessSuccess
(
response
:
BaseResponse
<
VreperienceBean
>)
{
VreperienceBean
.
value
=
response
.
result
KLog
.
e
(
"getChooseExperienceHeadData"
,
"成功================="
)
}
override
fun
onError
(
e
:
Throwable
)
{
KLog
.
e
(
"getChooseExperienceHeadData"
,
"请求失败 : $e"
)
}
}
)
...
...
app/src/main/java/com/mints/street/main/vr/FreeZoneFragment.kt
View file @
ee9f7189
...
...
@@ -22,7 +22,7 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel
private
var
vLayout
:
VirtualLayoutManager
?
=
null
private
var
mAdapter
:
DelegateAdapter
?
=
null
private
var
gridMapAdapter
:
GridMapAdapter
?
=
null
private
var
enterDestinationAdapter
:
EnterDestinationAdapter
?
=
null
//
private var enterDestinationAdapter: EnterDestinationAdapter? = null
override
fun
initContentView
(
inflater
:
LayoutInflater
?,
container
:
ViewGroup
?,
...
...
app/src/main/java/com/mints/street/model/ApiModel.kt
View file @
ee9f7189
...
...
@@ -97,14 +97,14 @@ object ApiModel {
/**
* 精选体验展示图
*/
fun
getChooseExperienceHeadData
(
lifecycleProvider
:
LifecycleProvider
<
Any
>?,
map
:
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>{
fun
getChooseExperienceHeadData
(
lifecycleProvider
:
LifecycleProvider
<
Any
>?,
map
:
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
VreperienceBean
>>>{
return
HttpManager
.
getInstance
().
execute
(
lifecycleProvider
,
MainApi
.
newInstance
().
getChooseExperienceHeadData
(
map
))
}
/**
* 精选体验详情
*/
fun
getChooseExperienceData
(
lifecycleProvider
:
LifecycleProvider
<
Any
>?,
map
:
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
Any
>>>{
fun
getChooseExperienceData
(
lifecycleProvider
:
LifecycleProvider
<
Any
>?,
map
:
Map
<
String
,
Any
>):
Observable
<
Response
<
BaseResponse
<
DetailedBean
>>>{
return
HttpManager
.
getInstance
().
execute
(
lifecycleProvider
,
MainApi
.
newInstance
().
getChooseExperienceData
(
map
))
}
/**
...
...
app/src/main/res/layout/activity_detailed.xml
View file @
ee9f7189
...
...
@@ -34,6 +34,7 @@
app:ctb_title=
"街景"
/>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingTop=
"20dp"
...
...
@@ -43,6 +44,7 @@
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_introduce"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"15dp"
...
...
app/src/main/res/layout/item_enter_destination_adapter.xml
View file @
ee9f7189
...
...
@@ -47,31 +47,30 @@
app:layout_constraintTop_toTopOf=
"@id/tv_name"
app:layout_constraintBottom_toBottomOf=
"@id/tv_number_people"
/>
<ImageView
<
com.mints.street.widget.XCRoundRect
ImageView
android:id=
"@+id/image1"
android:layout_width=
"0dp"
android:layout_height=
"
6
0dp"
android:layout_width=
"
10
0dp"
android:layout_height=
"
7
0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@id/image2"
tools:src=
"@mipmap/bg_fl"
/>
<ImageView
tools:src=
"@mipmap/bg_fl"
/>
<com.mints.street.widget.XCRoundRectImageView
android:layout_marginStart=
"10dp"
android:id=
"@+id/image2"
android:layout_width=
"0dp"
android:layout_height=
"
6
0dp"
android:layout_width=
"
10
0dp"
android:layout_height=
"
7
0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/image1"
app:layout_constraintEnd_toStartOf=
"@id/image3"
tools:src=
"@mipmap/bg_fl"
/>
<ImageView
<
com.mints.street.widget.XCRoundRect
ImageView
android:layout_marginStart=
"10dp"
android:id=
"@+id/image3"
android:layout_width=
"0dp"
android:layout_height=
"
6
0dp"
android:layout_width=
"
10
0dp"
android:layout_height=
"
7
0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/image2"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
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