use of org.gateshipone.malp.application.listviewitems.ProfileListItem in project malp by gateship-one.
the class ProfileAdapter method getView.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
MPDServerProfile profile = (MPDServerProfile) getItem(position);
// Profile name
String profileName = profile.getProfileName();
int port = profile.getPort();
String portString = String.valueOf(port);
String hostname = profile.getHostname();
boolean checked = profile.getAutoconnect();
if (convertView != null) {
ProfileListItem profileListItem = (ProfileListItem) convertView;
profileListItem.setProfileName(profileName);
profileListItem.setHostname(hostname);
profileListItem.setPort(portString);
profileListItem.setChecked(checked);
} else {
convertView = new ProfileListItem(mContext, profileName, hostname, portString, checked);
}
return convertView;
}
Aggregations