|
|
@@ -1,16 +1,19 @@
|
|
|
package com.sheep.gamegroup.module.user.activity;
|
|
|
|
|
|
+import android.content.Context;
|
|
|
import android.support.v4.content.ContextCompat;
|
|
|
import android.support.v7.widget.GridLayoutManager;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.view.View;
|
|
|
import android.widget.LinearLayout;
|
|
|
+import android.widget.TextView;
|
|
|
|
|
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
|
import com.chad.library.adapter.base.BaseViewHolder;
|
|
|
import com.sheep.gamegroup.absBase.BaseActivity;
|
|
|
import com.sheep.gamegroup.module.user.model.BuyVipReq;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
+import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
@@ -39,13 +42,17 @@ public class ActVip extends BaseActivity {
|
|
|
@Override
|
|
|
protected void convert(BaseViewHolder helper, BuyVipReq item) {
|
|
|
int position = helper.getAdapterPosition();
|
|
|
-// if (priceShow.isSelectState()){
|
|
|
-// convertView.setBackground(context.getResources().getDrawable(R.drawable.layer_list_check_rectgangle_small));
|
|
|
-// holder.item_tv_y.setTextColor(ContextCompat.getColor(context,R.color.main_tab_activated));
|
|
|
-// }else{
|
|
|
-// convertView.setBackground(context.getResources().getDrawable(R.drawable.btn_main_stroke_no_check_small));
|
|
|
-// holder.item_tv_y.setTextColor(ContextCompat.getColor(context,R.color.main_tab));
|
|
|
-// }
|
|
|
+ View convertView = helper.itemView;
|
|
|
+ Context context = SheepApp.getInstance();
|
|
|
+ TextView item_tv_y = convertView.findViewById(R.id.item_tv_y);
|
|
|
+
|
|
|
+ if (position == curPosition){
|
|
|
+ convertView.setBackground(context.getResources().getDrawable(R.drawable.layer_list_check_rectgangle_small));
|
|
|
+ item_tv_y.setTextColor(ContextCompat.getColor(context,R.color.main_tab_activated));
|
|
|
+ }else{
|
|
|
+ convertView.setBackground(context.getResources().getDrawable(R.drawable.btn_main_stroke_no_check_small));
|
|
|
+ item_tv_y.setTextColor(ContextCompat.getColor(context,R.color.main_tab));
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
adapter.bindToRecyclerView(recyclerView);
|