diff --git a/app/src/main/java/org/ntlab/irisclient/MemberListAdapter.java b/app/src/main/java/org/ntlab/irisclient/MemberListAdapter.java index eee7e44..d1092f7 100644 --- a/app/src/main/java/org/ntlab/irisclient/MemberListAdapter.java +++ b/app/src/main/java/org/ntlab/irisclient/MemberListAdapter.java @@ -6,6 +6,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; +import android.widget.ImageView; import android.widget.TextView; import org.ntlab.irisclient.models.Member; @@ -17,6 +18,7 @@ static class ViewHolder { TextView textView; + ImageView imageView; } private LayoutInflater inflater; private final int itemLayoutId; @@ -52,6 +54,7 @@ // ViewHolder を生成 holder = new ViewHolder(); holder.textView = convertView.findViewById(R.id.textView); + holder.imageView = convertView.findViewById(R.id.star); convertView.setTag(holder); @@ -79,6 +82,16 @@ convertView.setBackgroundColor(grayColor); } + + holder.imageView.setVisibility(View.GONE); + for(int i = 0 ; i < dcList.size();i++){ + if(dcList.get(i).getMaster()) { + holder.imageView.setVisibility(View.VISIBLE); + }else{ + holder.imageView.setVisibility(View.GONE); + } + } + } else { holder = (ViewHolder) convertView.getTag();