diff --git a/app/src/main/java/org/ntlab/irisclient/MemberListAdapter.java b/app/src/main/java/org/ntlab/irisclient/MemberListAdapter.java index ad6c9c4..2a5a125 100644 --- a/app/src/main/java/org/ntlab/irisclient/MemberListAdapter.java +++ b/app/src/main/java/org/ntlab/irisclient/MemberListAdapter.java @@ -8,6 +8,8 @@ import android.widget.ArrayAdapter; import android.widget.TextView; +import org.ntlab.irisclient.models.Member; + import java.util.List; public class MemberListAdapter extends ArrayAdapter { @@ -18,18 +20,21 @@ private LayoutInflater inflater; private final int itemLayoutId; private final List memberList; + private final List dcList; final int redColor = Color.rgb(172, 32,32); final int blueColor = Color.rgb(32, 32, 172); final int grayColor = Color.rgb(172, 172, 172); public MemberListAdapter(Context context, int itemLayoutId, - List members) { + List members, List mn) { super(context, 0); this.inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE); this.itemLayoutId = itemLayoutId; this.memberList = members; + this.dcList = mn; + } @Override @@ -47,6 +52,14 @@ convertView.setTag(holder); convertView.setBackgroundColor(grayColor); + + /*for(int i = 0 ; i < dcList.size();i++){ + if(dcList.get(i).getBelongs().equals("r")) { + convertView.setBackgroundColor(redColor); + } + }*/ + + /*if (position == 0) { // 背景色を変える convertView.setBackgroundColor(Color.rgb(255, 127, 255));