Created
July 26, 2017 12:20
-
-
Save sprejjs/405f8d44802197537b5a929cf2dff6dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NonNull | |
@Override | |
public View getView(int position, @Nullable View convertView, | |
@NonNull ViewGroup parent) { | |
if (convertView == null) { | |
convertView = LayoutInflater.from(getContext()) | |
.inflate(R.layout.contact_item, parent, false); | |
} | |
Contact contact = contacts.get(position); | |
((TextView)convertView | |
.findViewById(R.id.name_text_view)) | |
.setText(contact.getName()); | |
((TextView)convertView | |
.findViewById(R.id.mobile_text_view)) | |
.setText(contact.getMobile()); | |
((TextView)convertView | |
.findViewById(R.id.landline_text_view)) | |
.setText(contact.getLandline()); | |
return convertView; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment