Back to project page Briscola.
The source code is released under:
GNU General Public License
If you think the Android project Briscola listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.gmail.craptik.briscola; /*from w ww . ja va2 s. co m*/ import java.util.ArrayList; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; class ActionAdapter extends BaseAdapter { private Context context; private ArrayList<ActionItem> actions; public ActionAdapter(Context context, ArrayList<ActionItem> actions) { this.context = context; this.actions = actions; } @Override public int getCount() { return actions.size(); } @Override public Object getItem(int position) { return actions.get(position); } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View rowView = inflater.inflate(R.layout.row_action, parent, false); TextView nameView = (TextView) rowView.findViewById(R.id.row_action_name); TextView descView = (TextView) rowView.findViewById(R.id.row_action_desc); nameView.setText(actions.get(position).getName()); descView.setText(actions.get(position).getDesc()); return rowView; } }