Skip to content

Instantly share code, notes, and snippets.

@Adamwaheed
Created March 29, 2016 03:32
Show Gist options
  • Save Adamwaheed/9d696be1f9fb0993bc03 to your computer and use it in GitHub Desktop.
Save Adamwaheed/9d696be1f9fb0993bc03 to your computer and use it in GitHub Desktop.
InwardListViewAdaptor
public class InwardListViewAdaptor extends ArrayAdapter<Inward> {
public InwardListViewAdaptor(Activity context, ArrayList<Inward> data) {
super(context, R.layout.inward_row_item, data);
}
public View getView(int position, View view, ViewGroup parent) {
///LayoutInflater inflater = parent.getContext().getLayoutInflater();
View rowView = LayoutInflater.from(parent.getContext()).inflate(R.layout.inward_row_item, parent, false);
//View rowView= inflater.inflate(R.layout.voyage_item_row, null, true);
final Inward item = getItem(position);
TextView container_no = (TextView) rowView.findViewById(R.id.container_no);
TextView size = (TextView) rowView.findViewById(R.id.size);
container_no.setText(item.getContainer_no());
size.setText(item.getSize());
return rowView;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment