Commit f3ad3ad3 authored by mengcuiguang's avatar mengcuiguang

添加产品推荐

parent 8f58055b
...@@ -2,6 +2,7 @@ package com.mints.street.adapter ...@@ -2,6 +2,7 @@ package com.mints.street.adapter
import android.content.Context import android.content.Context
import android.graphics.Paint import android.graphics.Paint
import android.view.View
import com.alibaba.android.vlayout.layout.GridLayoutHelper import com.alibaba.android.vlayout.layout.GridLayoutHelper
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
...@@ -53,6 +54,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ListBean>) ...@@ -53,6 +54,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ListBean>)
holder.binding.tvDays.text = "${databean.days}天" holder.binding.tvDays.text = "${databean.days}天"
holder.binding.tvOldprice.text = "原价¥${databean.oldPrice}" holder.binding.tvOldprice.text = "原价¥${databean.oldPrice}"
holder.binding.tvPrice.text = "¥${databean.price}" holder.binding.tvPrice.text = "¥${databean.price}"
holder.binding.ivHot.visibility = if (databean.activityType == 0) View.GONE else View.VISIBLE
} }
} }
...@@ -69,7 +71,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ListBean>) ...@@ -69,7 +71,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ListBean>)
override fun getLayoutId(viewType: Int) = R.layout.item_grid_payment_adpater override fun getLayoutId(viewType: Int) = R.layout.item_grid_payment_adpater
fun getPosition()=mposition fun getPosition() = mposition
} }
...@@ -8,8 +8,12 @@ ...@@ -8,8 +8,12 @@
type="com.mints.street.adapter.GridPaymentAdapter" /> type="com.mints.street.adapter.GridPaymentAdapter" />
</data> </data>
<LinearLayout <FrameLayout
android:id="@+id/bg" android:id="@+id/bg"
android:layout_width="80dp"
android:layout_height="130dp">
<LinearLayout
android:layout_width="80dp" android:layout_width="80dp"
android:layout_height="130dp" android:layout_height="130dp"
android:gravity="center" android:gravity="center"
...@@ -37,4 +41,13 @@ ...@@ -37,4 +41,13 @@
android:textColor="#25000000" android:textColor="#25000000"
android:textSize="10dp" /> android:textSize="10dp" />
</LinearLayout> </LinearLayout>
<ImageView
android:id="@+id/iv_hot"
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:src="@mipmap/ic_vip_hot"
></ImageView>
</FrameLayout>
</layout> </layout>
\ No newline at end of file
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