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

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

parent 8bdad791
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
......@@ -15,7 +17,9 @@ import com.mints.street.BR
import com.mints.street.R
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
......
package com.mints.street.adapter
import android.content.Context
import android.content.Intent
import com.alibaba.android.vlayout.layout.LinearLayoutHelper
import com.fry.base.adapter.AbstractVLayoutBaseAdapter
import com.fry.base.adapter.BindingViewHolder
......@@ -8,6 +9,7 @@ import com.fry.base.utils.ImageLoader
import com.mints.street.R
import com.mints.street.bean.VrmapBean
import com.mints.street.databinding.ItemEnterDestinationAdapterBinding
import com.mints.street.main.vr.DetailedActivity
/**
......@@ -34,6 +36,10 @@ class ItemEnterDestinationAdapter(
} else {
bgLayoutParams.width = a.widthPixels
}
holder.itemView.setOnClickListener {
var intent = Intent(context, DetailedActivity::class.java)
context.startActivity(intent)
}
list?.let { it ->
holder.binding.tvName.text = it[position].name
holder.binding.tvNumberPeople.text = "人数"
......
......@@ -40,7 +40,6 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel
override fun initData() {
super.initData()
//初始化布局管理器
if (context == null) return
vLayout = VirtualLayoutManager(context!!);
......@@ -49,8 +48,6 @@ class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel
binding.listView.layoutManager = vLayout
binding.listView.adapter = mAdapter
}
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