Commit 6987aafa authored by 张释方's avatar 张释方

更改Vr街景详细信息界面逻辑

parent 8bdad791
package com.mints.street.adapter package com.mints.street.adapter
import android.content.Context import android.content.Context
import android.content.Intent
import android.view.View import android.view.View
import androidx.core.content.ContextCompat.startActivity
import androidx.databinding.ObservableArrayList import androidx.databinding.ObservableArrayList
import androidx.databinding.ObservableList import androidx.databinding.ObservableList
import androidx.databinding.ViewDataBinding import androidx.databinding.ViewDataBinding
...@@ -15,7 +17,9 @@ import com.mints.street.BR ...@@ -15,7 +17,9 @@ import com.mints.street.BR
import com.mints.street.R import com.mints.street.R
import com.mints.street.bean.VrmapBean import com.mints.street.bean.VrmapBean
import com.mints.street.databinding.EnterDestinationAdapterBinding import com.mints.street.databinding.EnterDestinationAdapterBinding
import com.mints.street.main.vr.DetailedActivity
import com.mints.street.main.vr.FreeZoneViewModel import com.mints.street.main.vr.FreeZoneViewModel
import com.mints.street.webview.MintsWebViewActivity
import me.tatarka.bindingcollectionadapter2.BindingRecyclerViewAdapter import me.tatarka.bindingcollectionadapter2.BindingRecyclerViewAdapter
import me.tatarka.bindingcollectionadapter2.ItemBinding import me.tatarka.bindingcollectionadapter2.ItemBinding
......
package com.mints.street.adapter package com.mints.street.adapter
import android.content.Context import android.content.Context
import android.content.Intent
import com.alibaba.android.vlayout.layout.LinearLayoutHelper import com.alibaba.android.vlayout.layout.LinearLayoutHelper
import com.fry.base.adapter.AbstractVLayoutBaseAdapter import com.fry.base.adapter.AbstractVLayoutBaseAdapter
import com.fry.base.adapter.BindingViewHolder import com.fry.base.adapter.BindingViewHolder
...@@ -8,6 +9,7 @@ import com.fry.base.utils.ImageLoader ...@@ -8,6 +9,7 @@ import com.fry.base.utils.ImageLoader
import com.mints.street.R import com.mints.street.R
import com.mints.street.bean.VrmapBean import com.mints.street.bean.VrmapBean
import com.mints.street.databinding.ItemEnterDestinationAdapterBinding import com.mints.street.databinding.ItemEnterDestinationAdapterBinding
import com.mints.street.main.vr.DetailedActivity
/** /**
...@@ -34,6 +36,10 @@ class ItemEnterDestinationAdapter( ...@@ -34,6 +36,10 @@ class ItemEnterDestinationAdapter(
} else { } else {
bgLayoutParams.width = a.widthPixels bgLayoutParams.width = a.widthPixels
} }
holder.itemView.setOnClickListener {
var intent = Intent(context, DetailedActivity::class.java)
context.startActivity(intent)
}
list?.let { it -> list?.let { it ->
holder.binding.tvName.text = it[position].name holder.binding.tvName.text = it[position].name
holder.binding.tvNumberPeople.text = "人数" holder.binding.tvNumberPeople.text = "人数"
......
...@@ -40,7 +40,6 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel ...@@ -40,7 +40,6 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel
override fun initData() { override fun initData() {
super.initData() super.initData()
//初始化布局管理器 //初始化布局管理器
if (context == null) return if (context == null) return
vLayout = VirtualLayoutManager(context!!); vLayout = VirtualLayoutManager(context!!);
...@@ -49,8 +48,6 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel ...@@ -49,8 +48,6 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel
binding.listView.layoutManager = vLayout binding.listView.layoutManager = vLayout
binding.listView.adapter = mAdapter binding.listView.adapter = mAdapter
} }
override fun initViewObservable() { override fun initViewObservable() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment