Commit 32253ee1 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

parent c2d821b2
......@@ -90,7 +90,7 @@ public interface LoanService {
/**
* 查询vip产品
*/
@POST("vip/vedioV1/getVipProducts")
@POST("vedioV1/getVipProducts")
Observable<BaseResponse<VipBean>> getVipProducts(@Body Map<String, Object> vo);
/**
......
......@@ -63,8 +63,8 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
holder.tvVipItemLable.visibility = View.VISIBLE
holder.tvVipItemLable.text = vipBean.topTitle
}
holder.tvVipItemTitle.text = vipBean.title
holder.tvVipItemCurMoney.text = vipBean.price.toString() + "元"
holder.tvVipItemCurMoney.text = vipBean.title
holder.tvVipItemTitle.text = vipBean.price.toString() + "元"
if (TextUtils.isEmpty(vipBean.remarks)) {
holder.tvVipItemMoney.visibility = View.GONE
} else {
......@@ -80,25 +80,15 @@ class VipAdapter(val vipList: MutableList<VipBean.ListBean>) :
if (getPosition() == position) {
//当前选中
holder.rlVipItemRoot.setBackgroundResource(R.drawable.shape_vip_adapter)
holder.tvVipItemCurMoney.setTextColor(
ContextCompat.getColor(
context,
R.color.color_FD7E0E
)
)
GlideUtils.loadRoundImageViewGif(
context,
R.drawable.ic_loading,
holder.ivVipItemPoint
)
holder.ivVipItemPoint.visibility=View.VISIBLE
} else {
holder.rlVipItemRoot.setBackgroundResource(R.drawable.shape_vip_adapter_none)
holder.tvVipItemCurMoney.setTextColor(
ContextCompat.getColor(
context,
R.color.white
)
)
holder.ivVipItemPoint.visibility=View.GONE
}
holder.itemView.setTag(position)
......
......@@ -11,17 +11,17 @@
android:layout_marginBottom="5dp">
<RelativeLayout
android:layout_marginTop="6dp"
android:id="@+id/rlVipItemRoot"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:background="@drawable/shape_vip_adapter_none">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center_horizontal"
android:gravity="center"
android:orientation="vertical">
<TextView
......@@ -36,8 +36,8 @@
android:id="@+id/tvVipItemCurMoney"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginBottom="4dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="8dp"
android:text="$78"
android:textColor="@color/black"
android:textSize="13sp" />
......
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