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
c520d1f0
Commit
c520d1f0
authored
Jul 31, 2021
by
fengruiyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_1.0.0' of
http://39.97.65.143:81/android/android_street
into fry_dev
parents
13c048f7
8480e59e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
GridVrMapAdapter.kt
...rc/main/java/com/mints/street/adapter/GridVrMapAdapter.kt
+14
-5
No files found.
app/src/main/java/com/mints/street/adapter/GridVrMapAdapter.kt
View file @
c520d1f0
package
com.mints.street.adapter
package
com.mints.street.adapter
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.pm.ActivityInfo
import
android.content.pm.ActivityInfo
import
android.os.UserManager
import
android.view.Window
import
android.view.Window
import
android.view.WindowManager
import
android.view.WindowManager
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.RecyclerView
...
@@ -14,13 +16,17 @@ import com.fry.base.binding.setMargin
...
@@ -14,13 +16,17 @@ import com.fry.base.binding.setMargin
import
com.fry.base.utils.ImageLoader
import
com.fry.base.utils.ImageLoader
import
com.mints.street.R
import
com.mints.street.R
import
com.mints.street.bean.DetailedBean
import
com.mints.street.bean.DetailedBean
import
com.mints.street.bean.UserBean
import
com.mints.street.databinding.ItemGridVrmapAdapterBinding
import
com.mints.street.databinding.ItemGridVrmapAdapterBinding
import
com.mints.street.main.my.OpenvipActivity
import
com.mints.street.main.vr.DetailedActivity
import
com.mints.street.main.vr.DetailedViewModel
import
com.mints.street.main.vr.DetailedViewModel
import
me.goldze.mvvmhabit.utils.AppUtils
import
me.goldze.mvvmhabit.utils.AppUtils
import
me.goldze.mvvmhabit.utils.RxUtils
import
me.goldze.mvvmhabit.utils.RxUtils
class
GridVrMapAdapter
(
val
context
:
Context
,
var
list
:
List
<
DetailedBean
.
DetailedItemBean
>?,
val
viewModel
:
DetailedViewModel
)
:
class
GridVrMapAdapter
(
val
context
:
Context
,
var
list
:
List
<
DetailedBean
.
DetailedItemBean
>?,
val
viewModel
:
DetailedViewModel
)
:
AbstractVLayoutBaseAdapter
<
ItemGridVrmapAdapterBinding
,
List
<
DetailedBean
.
DetailedItemBean
>>(
context
,
list
,
2
)
{
AbstractVLayoutBaseAdapter
<
ItemGridVrmapAdapterBinding
,
List
<
DetailedBean
.
DetailedItemBean
>>(
context
,
list
,
2
)
{
private
val
userManager
by
lazy
{
com
.
mints
.
street
.
manager
.
UserManager
.
INSTANCE
}
override
fun
onBindViewHolder
(
override
fun
onBindViewHolder
(
holder
:
BindingViewHolder
<
ItemGridVrmapAdapterBinding
>,
holder
:
BindingViewHolder
<
ItemGridVrmapAdapterBinding
>,
position
:
Int
position
:
Int
...
@@ -41,13 +47,16 @@ class GridVrMapAdapter(val context: Context, var list: List<DetailedBean.Detaile
...
@@ -41,13 +47,16 @@ class GridVrMapAdapter(val context: Context, var list: List<DetailedBean.Detaile
ImageLoader
.
ImageBuilder
.
with
(
context
)
ImageLoader
.
ImageBuilder
.
with
(
context
)
.
setUrl
(
it
[
position
].
img
).
setTargetView
(
holder
.
binding
.
image
).
start
()
.
setUrl
(
it
[
position
].
img
).
setTargetView
(
holder
.
binding
.
image
).
start
()
}
}
RxUtils
.
onMultiClick
(
holder
.
binding
.
bg
){
RxUtils
.
onMultiClick
(
holder
.
binding
.
bg
)
{
viewModel
.
authorized
(
list
?.
get
(
position
)
?.
name
,
list
?.
get
(
position
)
?.
lat
,
list
?.
get
(
position
)
?.
lng
)
if
(
userManager
.
getVipFlag
())
{
//是会员
viewModel
.
authorized
(
list
?.
get
(
position
)
?.
name
,
list
?.
get
(
position
)
?.
lat
,
list
?.
get
(
position
)
?.
lng
)
}
else
{
context
.
startActivity
(
Intent
(
context
,
OpenvipActivity
::
class
.
java
))
}
}
}
}
}
override
fun
getItemCount
()
=
list
?.
size
?:
0
override
fun
getItemCount
()
=
list
?.
size
?:
0
override
fun
onCreateLayoutHelper
():
LayoutHelper
{
override
fun
onCreateLayoutHelper
():
LayoutHelper
{
val
hp
:
GridLayoutHelper
=
GridLayoutHelper
(
2
)
val
hp
:
GridLayoutHelper
=
GridLayoutHelper
(
2
)
...
...
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