Commit 1ea0bdb7 authored by 张释方's avatar 张释方

添加Vr界面数据

parent c281a217
package com.mints.street.adapter
import android.content.Context
import android.view.View
import com.alibaba.android.vlayout.layout.GridLayoutHelper
import com.bumptech.glide.Glide
import com.fry.base.adapter.AbstractVLayoutBaseAdapter
import com.fry.base.adapter.BindingViewHolder
import com.fry.base.binding.setMargin
import com.mints.street.R
import com.mints.street.bean.VrmapBean
import com.mints.street.databinding.ItemGridMapAdapterBinding
import com.mints.street.main.vr.PanoramicActivity
import com.mints.street.webview.MintsWebViewActivity
import me.goldze.mvvmhabit.utils.AppUtils
import me.goldze.mvvmhabit.utils.RxUtils
/**
* Created by 冯瑞雨 on 2021/7/9.
*/
class GridMapAdapter(val context: Context,val list :List<String>):AbstractVLayoutBaseAdapter<ItemGridMapAdapterBinding,List<String>>(context,list,2) {
class GridMapAdapter(val context: Context, var list: List<VrmapBean.Internal>?) :
AbstractVLayoutBaseAdapter<ItemGridMapAdapterBinding, List<VrmapBean.Internal>>(context, list, 2) {
private var datalist: List<VrmapBean.Internal>? = list
override fun onBindViewHolder(
holder: BindingViewHolder<ItemGridMapAdapterBinding>,
position: Int
) {
var a = holder.binding.bg.layoutParams
if(position%2 == 0){
holder.binding.bg.setMargin(AppUtils.dp2Px(context,10F),AppUtils.dp2Px(context,10F),AppUtils.dp2Px(context,10F),0,null,null,null)
}else{
holder.binding.bg.setMargin(0,AppUtils.dp2Px(context,10F),AppUtils.dp2Px(context,10F),0,null,null,null)
if (position % 2 == 0) {
holder.binding.bg.setMargin(AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F),
AppUtils.dp2Px(context, 10F), 0, null, null, null)
} else {
holder.binding.bg.setMargin(0, AppUtils.dp2Px(context, 10F), AppUtils.dp2Px(context, 10F),
0, null, null, null)
}
RxUtils.onMultiClick(holder.binding.bg){
PanoramicActivity.starPanoramicActivity(context,""
,PanoramicActivity.WGS84,lat =39.906283536127169,lon = 116.39129554889048 )
datalist?.let {
var databean = it[position]
//设置图片
Glide.with(mContext).load(databean.img).into(holder.binding.image)
//设置标题
holder.binding.tvName.text = databean.name
// //设置星星数量
// var i = 0
// while (i < 5) {
// holder.binding.lyStar.addView(View.inflate(context, R.layout.include_start_show, null))
// i += 1
// }
//设置点击跳转
holder.itemView.setOnClickListener {
//页面跳转
MintsWebViewActivity.startWebView(databean.name, url = databean.url)
}
}
// RxUtils.onMultiClick(holder.binding.bg) {
// PanoramicActivity.starPanoramicActivity(context, ""
// , PanoramicActivity.WGS84, lat = 39.906283536127169, lon = 116.39129554889048)
// }
}
override fun getItemCount() = list.size
override fun getItemCount() = list!!.size
override fun onCreateLayoutHelper()=GridLayoutHelper(2)
override fun onCreateLayoutHelper() = GridLayoutHelper(2)
override fun getLayoutId(viewType: Int) = R.layout.item_grid_map_adapter
}
\ No newline at end of file
......@@ -20,6 +20,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ListBean>)
private var first: Int = 1
private var datalist: List<VipBean.ListBean>? = list
private var mposition: Int = -1
override fun onBindViewHolder(holder: BindingViewHolder<ItemGridPaymentAdpaterBinding>, position: Int) {
holder.binding.tvOldprice.paint.flags = Paint.STRIKE_THRU_TEXT_FLAG
......@@ -54,8 +55,8 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ListBean>)
notifyDataSetChanged()
}
holder.binding.tvDays.text = "${databean.days}天"
holder.binding.tvOldprice.text = "原价${databean.oldPrice}"
holder.binding.tvPrice.text = "${databean.price}"
holder.binding.tvOldprice.text = "原价¥${databean.oldPrice}"
holder.binding.tvPrice.text = "¥${databean.price}"
}
}
......
......@@ -43,7 +43,7 @@ interface MainApi {
* 开通vip
*/
@POST("api/getVipProductsByType")
fun getVipProductsByType(@Body vo: @JvmSuppressWildcards Map<String, Any>): Observable<Response<BaseResponse<VipBean>>>
fun getVipProductsByType(): Observable<Response<BaseResponse<VipBean>>>
/**
* 获取vip支付渠道
......@@ -57,6 +57,12 @@ interface MainApi {
@POST("api/baseMsg")
fun baseMsg():Observable<Response<BaseResponse<UserBean>>>
/**
* 获取VR街景数据
*/
@POST("na/vrPlaces")
fun vrPlaces():Observable<Response<BaseResponse<VrmapBean>>>
/**
* 绑定手机号接口
*/
......
......@@ -5,7 +5,7 @@ import java.io.Serializable
class VipBean : Serializable {
var list: List<ListBean>? = null
inner class ListBean : Serializable {
inner class ListBean : Serializable{
var id: Int = 0 // 1
var price: Int = 0// 78
var days: Int = 0 // 365
......
package com.mints.street.bean
import java.io.Serializable
class VrmapBean : Serializable {
val abroad: List<Abroad>? = null//国外
val internal: List<Internal>? = null//国内
inner class Internal : Serializable {
val img: String? = null
val name: String? = null
val stars: String? = null
val url: String? = null
}
inner class Abroad : Serializable {
val group: Group? = null
val img: List<String>? = null
val name: String? = null
}
inner class Group : Serializable {
val brief: String? = null
val list: List<list>? = null
}
inner class list : Serializable {
val img: String? = null
val name: String? = null
}
}
\ No newline at end of file
......@@ -9,7 +9,8 @@ import me.goldze.mvvmhabit.binding.command.BindingCommand
* Created by 冯瑞雨 on 2021/7/9.
*/
class HomeButtonItemVM(viewModel: HomeViewModel,val name:String?,val image1:String,
val image2:String,val image3:String,var latitude:String?,var longitude:String?) : ItemViewModel<HomeViewModel?>(viewModel) {
val image2:String,val image3:String,
var latitude:String?,var longitude:String?) : ItemViewModel<HomeViewModel?>(viewModel) {
val onItemClick = BindingCommand<Any?>(BindingAction {
//SearchMapActivity.startSearchMapActivity()
......
......@@ -23,10 +23,8 @@ class OpenvipViewModel(application: Application) : BaseViewModel(application) {
* @param mobile
*/
fun openvipInfo() {
val vo = HashMap<String, Any>()
vo["type"] = 1
ApiModel.openvip(lifecycleProvider, vo).safeSubscribe(
ApiModel.openvip(lifecycleProvider).safeSubscribe(
object : HttpSubscribeImpl<BaseResponse<VipBean>>(
this@OpenvipViewModel, true) {
override fun onBusinessSuccess(response: BaseResponse<VipBean>) {
......
package com.mints.street.main.vr
import com.mints.street.main.home.HomeViewModel
import com.mints.street.webview.MintsWebViewActivity
import me.goldze.mvvmhabit.base.ItemViewModel
import me.goldze.mvvmhabit.binding.command.BindingAction
import me.goldze.mvvmhabit.binding.command.BindingCommand
class FreeButtonItemVM(viewModel: HomeViewModel, val name:String?, val image1:String,
val image2:String, val image3:String,
var latitude:String?, var longitude:String?) : ItemViewModel<HomeViewModel?>(viewModel) {
val onItemClick = BindingCommand<Any?>(BindingAction {
//SearchMapActivity.startSearchMapActivity()
MintsWebViewActivity.startWebView(name,latitude = latitude,longitude = longitude)
})
}
\ No newline at end of file
......@@ -3,47 +3,65 @@ package com.mints.street.main.vr
import android.os.Bundle
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.lifecycle.Observer
import com.alibaba.android.vlayout.DelegateAdapter
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.ItemEnterDestinationAdapter
import com.mints.street.adapter.GridMapAdapter
import com.mints.street.bean.VrmapBean
import com.mints.street.databinding.FragmentFreeZoneBinding
import me.goldze.mvvmhabit.utils.AppUtils
import me.goldze.mvvmhabit.utils.Utils
/**
* Created by 冯瑞雨 on 2021/7/9.
* 免费专区
*/
class FreeZoneFragment:BaseFragment<FragmentFreeZoneBinding,FreeZoneViewModel>() {
class FreeZoneFragment : BaseFragment<FragmentFreeZoneBinding, FreeZoneViewModel>() {
private var vLayout: VirtualLayoutManager? = null
private var mAdapter: DelegateAdapter? = null
private var gridMapAdapter: GridMapAdapter? = null
override fun initContentView(
inflater: LayoutInflater?,
container: ViewGroup?,
savedInstanceState: Bundle?
)= R.layout.fragment_free_zone
) = R.layout.fragment_free_zone
override fun initVariableId() = BR.viewModel
override fun onResume() {
super.onResume()
//获取VR全景数据
viewModel.vrPlaces()
}
override fun initData() {
super.initData()
//初始化布局管理器
if (context ==null)return
if (context == null) return
vLayout = VirtualLayoutManager(context!!);
mAdapter = DelegateAdapter(vLayout,false)
mAdapter = DelegateAdapter(vLayout, false)
binding.listView.layoutManager = vLayout
binding.listView.adapter = mAdapter
mAdapter?.addAdapter(EnterDestinationAdapter(context!!, ""))
mAdapter?.addAdapter(GridMapAdapter(context!!, listOf("1","2","3","4","5","")))
}
override fun initViewObservable() {
super.initViewObservable()
viewModel.VrmapBean.observe(this, Observer<VrmapBean> {
if (gridMapAdapter == null){
gridMapAdapter = GridMapAdapter(context!!, it.internal)
mAdapter?.addAdapter(gridMapAdapter)
}
gridMapAdapter?.list = it.internal
mAdapter?.notifyDataSetChanged()
})
}
}
\ No newline at end of file
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.VipBean
import com.mints.street.bean.VrmapBean
import com.mints.street.model.ApiModel
import com.mints.street.netwrok.base.HttpSubscribeImpl
import me.goldze.mvvmhabit.base.BaseViewModel
import me.goldze.mvvmhabit.utils.KLog
import java.util.HashMap
/**
* Created by 冯瑞雨 on 2021/7/9.
*/
class FreeZoneViewModel(application: Application):BaseViewModel(application) {
//获取vr街景数据
val VrmapBean: MutableLiveData<VrmapBean> = MutableLiveData()
fun vrPlaces(){//无参数传递
ApiModel.vrPlaces(lifecycleProvider).safeSubscribe(
object : HttpSubscribeImpl<BaseResponse<VrmapBean>>(
this@FreeZoneViewModel,true){
override fun onBusinessSuccess(response: BaseResponse<VrmapBean>) {
VrmapBean.value=response.result
KLog.e("vrPlaces","请求成功")
}
override fun onError(e: Throwable) {
KLog.e("vrPlaces","请求失败")
}
}
)
}
}
\ No newline at end of file
......@@ -41,9 +41,9 @@ object ApiModel {
/**
* 开通会员
*/
fun openvip(lifecycleProvider: LifecycleProvider<Any>?, map: Map<String, Any>): Observable<Response<BaseResponse<VipBean>>> {
fun openvip(lifecycleProvider: LifecycleProvider<Any>?): Observable<Response<BaseResponse<VipBean>>> {
return HttpManager.getInstance()
.execute(lifecycleProvider, MainApi.newInstance().getVipProductsByType(map))
.execute(lifecycleProvider, MainApi.newInstance().getVipProductsByType())
}
/**
......@@ -62,6 +62,14 @@ object ApiModel {
.execute(lifecycleProvider, MainApi.newInstance().baseMsg())
}
/**
* 获取VR街景数据
*/
fun vrPlaces(lifecycleProvider: LifecycleProvider<Any>?):Observable<Response<BaseResponse<VrmapBean>>>{
return HttpManager.getInstance()
.execute(lifecycleProvider,MainApi.newInstance().vrPlaces())
}
/**
* 绑定手机号登录
*/
......
package com.mints.street.widget;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.ImageView;
@SuppressLint("AppCompatCustomView")
public class XCRoundRectImageView extends ImageView {
private Paint paint;
public XCRoundRectImageView(Context context) {
this(context,null);
}
public XCRoundRectImageView(Context context, AttributeSet attrs) {
this(context, attrs,0);
}
public XCRoundRectImageView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
paint = new Paint();
}
/**
* 绘制圆角矩形图片
* @author caizhiming
*/
@Override
protected void onDraw(Canvas canvas) {
Drawable drawable = getDrawable();
if (null != drawable) {
Bitmap bitmap = ((BitmapDrawable) drawable).getBitmap();
Bitmap b = getRoundBitmap(bitmap, 20);
final Rect rectSrc = new Rect(0, 0, b.getWidth(), b.getHeight());
final Rect rectDest = new Rect(0,0,getWidth(),getHeight());
paint.reset();
canvas.drawBitmap(b, rectSrc, rectDest, paint);
} else {
super.onDraw(canvas);
}
}
/**
* 获取圆角矩形图片方法
* @param bitmap
* @param roundPx,一般设置成14
* @return Bitmap
* @author caizhiming
*/
private Bitmap getRoundBitmap(Bitmap bitmap, int roundPx) {
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
bitmap.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
final RectF rectF = new RectF(rect);
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColor(color);
int x = bitmap.getWidth();
canvas.drawRoundRect(rectF, roundPx, roundPx, paint);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
canvas.drawBitmap(bitmap, rect, rect, paint);
return output;
}
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:topLeftRadius="15dp"
android:topRightRadius="20dp" />
<solid android:color="@color/white" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="8dp" />
<solid android:color="@color/white" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#80FFFFFF" />
<corners android:radius="5dp" />
</shape>
\ No newline at end of file
......@@ -4,6 +4,7 @@
<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"
......@@ -12,12 +13,13 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:visibility="gone"
android:id="@+id/ll_title_bg"
android:layout_width="120dp"
android:layout_height="30dp"
android:gravity="center"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/ctb_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
......@@ -58,7 +60,6 @@
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recy_list"
android:layout_width="match_parent"
......@@ -66,30 +67,32 @@
android:paddingTop="30dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/view_bg" />
<EditText
android:paddingStart="45dp"
android:id="@+id/et"
android:paddingEnd="10dp"
android:layout_width="match_parent"
android:layout_height="37dp"
android:layout_marginEnd="20dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:background="@drawable/cursor_bg_shape"
android:gravity="center_vertical"
android:hint="请输入地址"
android:textColorHint="#E1E1E1"
android:paddingStart="45dp"
android:paddingEnd="10dp"
android:textColor="@color/color_8F6D21"
android:textColorHint="#E1E1E1"
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" />
<ImageView
android:layout_marginStart="16dp"
android:id="@+id/im_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:src="@mipmap/search_icon"
app:layout_constraintBottom_toBottomOf="@id/et"
app:layout_constraintStart_toStartOf="@id/et"
......@@ -101,19 +104,19 @@
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"
android:background="@color/white"
android:visibility="@{viewModel.searchAfterOneItems.size() == 0 ? view.GONE:view.VISIBLE}"
app:itemBinding="@{viewModel.searchAfterItemBinding}"
app:items="@{viewModel.searchAfterOneItems}"
android:visibility="@{viewModel.searchAfterOneItems.size() == 0 ? view.GONE:view.VISIBLE}"
/>
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/et" />
</androidx.constraintlayout.widget.ConstraintLayout>
......@@ -123,6 +126,7 @@
<variable
name="viewModel"
type="com.mints.street.main.home.SearchMapViewModel" />
<variable
name="view"
type="android.view.View" />
......
......@@ -18,8 +18,8 @@
app:srlPrimaryColor="@color/white">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</FrameLayout>
......
......@@ -107,7 +107,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:background="@drawable/cursor_bg"
android:gravity="center_horizontal"
android:paddingBottom="10dp"
android:orientation="vertical">
......
<?xml version="1.0" encoding="utf-8"?>
<ImageView android:layout_width="20dp"
android:layout_height="20dp"
android:padding="5dp"
android:layout_margin="3dp"
android:src="@mipmap/star_icon"
xmlns:android="http://schemas.android.com/apk/res/android" />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="viewModel"
type="com.mints.street.adapter.GridMapAdapter" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:id="@+id/bg"
android:layout_width="150dp"
android:layout_height="150dp"
android:background="@drawable/shape_gold_card_20">
<ImageView
android:id="@+id/image"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="100dp"
android:layout_height="230dp"
android:background="@drawable/shape_bg_vrdata"
android:elevation="5dp"
android:orientation="vertical">
<com.mints.street.widget.XCRoundRectImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="90dp"/>
android:layout_height="160dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:padding="10dp"
android:id="@+id/tv_name"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="测试"
android:textColor="@color/black"
android:textSize="12sp"
/>
android:textSize="12sp" />
<LinearLayout
app:layout_constraintTop_toBottomOf="@id/tv_name"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="0dp"
android:id="@+id/ly_star"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<ImageView
android:padding="5dp"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@mipmap/star_icon"
/><ImageView
android:padding="5dp"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@mipmap/star_icon"
/><ImageView
android:padding="5dp"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@mipmap/star_icon"
/><ImageView
android:padding="5dp"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@mipmap/star_icon"
/>
android:orientation="horizontal">
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
>
<data>
......@@ -7,54 +8,57 @@
name="viewModel"
type="com.mints.street.main.home.HomeButtonItemVM" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="138dp"
android:background="@mipmap/abc_popup_background_mtrl_mult"
android:layout_height="149dp"
android:background="@drawable/cursor_bg_inside"
android:padding="15dp"
app:onClickCommand="@{viewModel.onItemClick}"
>
android:layout_marginLeft="10dp"
android:layout_marginBottom="5dp"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:elevation="5dp"
app:onClickCommand="@{viewModel.onItemClick}">
<TextView
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@{viewModel.name}"
android:textColor="#323334"
android:textSize="15sp"
android:singleLine="true"
android:textStyle="bold"
android:textColor="#323334"
/>
<ImageView
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mints.street.widget.XCRoundRectImageView
android:id="@+id/image1"
android:layout_width="0dp"
android:layout_height="79dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/image2"
app:url="@{viewModel.image1}"
/>
<ImageView
android:layout_marginStart="10dp"
app:layout_constraintStart_toStartOf="parent"
app:url="@{viewModel.image1}" />
<com.mints.street.widget.XCRoundRectImageView
android:id="@+id/image2"
android:layout_width="0dp"
android:layout_height="79dp"
android:layout_marginStart="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/image1"
app:layout_constraintEnd_toStartOf="@id/image3"
app:url="@{viewModel.image2}"
app:layout_constraintStart_toEndOf="@id/image1"
app:url="@{viewModel.image2}" />
/>
<ImageView
android:layout_marginStart="10dp"
<com.mints.street.widget.XCRoundRectImageView
android:id="@+id/image3"
android:layout_width="0dp"
android:layout_height="79dp"
android:layout_marginStart="10dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/image2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/image2"
app:url="@{viewModel.image3}"
/>
......
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