use of org.gateshipone.malp.application.listviewitems.OutputListItem in project malp by gateship-one.
the class OutputAdapter method getView.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
MPDOutput output = (MPDOutput) getItem(position);
// Profile name
String outputName = output.getOutputName();
int outputId = output.getID();
boolean active = output.getOutputState();
if (convertView == null) {
// Create a new View and not reuse it
convertView = new OutputListItem(mContext, outputName, active, outputId);
} else {
OutputListItem outputItem = (OutputListItem) convertView;
outputItem.setName(outputName);
outputItem.setChecked(active);
}
return convertView;
}
Aggregations