package andronGames.gamesUtil; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; import java.util.*; public class MyListAdapter extends ArrayAdapter { private Context context; private List myValues; private int itemShablon; public MyListAdapter(Context context,int itemShablon,List values) { super(context,itemShablon,values); this.context=context; this.myValues=values; this.itemShablon=itemShablon;} public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View rowView = inflater.inflate(this.itemShablon, parent, false); TextView textView = (TextView) rowView.findViewById(R.id.labelList); ImageView imageView = (ImageView) rowView.findViewById(R.id.iconList); imageView.setImageResource(R.drawable.exit_icon); textView.setText((String)myValues.get(position)); return rowView;} }