Commit f3ad3ad3 authored by mengcuiguang's avatar mengcuiguang

添加产品推荐

parent 8f58055b
......@@ -2,6 +2,7 @@ package com.mints.street.adapter
import android.content.Context
import android.graphics.Paint
import android.view.View
import com.alibaba.android.vlayout.layout.GridLayoutHelper
import com.alibaba.android.vlayout.layout.LinearLayoutHelper
import com.fry.base.adapter.AbstractVLayoutBaseAdapter
......@@ -53,6 +54,7 @@ class GridPaymentAdapter(val context: Context, val list: List<VipBean.ListBean>)
holder.binding.tvDays.text = "${databean.days}天"
holder.binding.tvOldprice.text = "原价¥${databean.oldPrice}"
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>)
override fun getLayoutId(viewType: Int) = R.layout.item_grid_payment_adpater
fun getPosition()=mposition
fun getPosition() = mposition
}
......@@ -8,33 +8,46 @@
type="com.mints.street.adapter.GridPaymentAdapter" />
</data>
<LinearLayout
<FrameLayout
android:id="@+id/bg"
android:layout_width="80dp"
android:layout_height="130dp"
android:gravity="center"
android:orientation="vertical">
android:layout_height="130dp">
<TextView
android:id="@+id/tv_days"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textStyle="bold" />
<LinearLayout
android:layout_width="80dp"
android:layout_height="130dp"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF5722"
android:textSize="28dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_days"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FF5722"
android:textSize="28dp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_oldprice"
<TextView
android:id="@+id/tv_oldprice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#25000000"
android:textSize="10dp" />
</LinearLayout>
<ImageView
android:id="@+id/iv_hot"
android:layout_gravity="right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#25000000"
android:textSize="10dp" />
</LinearLayout>
android:visibility="gone"
android:src="@mipmap/ic_vip_hot"
></ImageView>
</FrameLayout>
</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