Commit 32253ee1 authored by mengcuiguang2's avatar mengcuiguang2

代码优化

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