Return to Snippet

Revision: 48247
at June 27, 2011 17:22 by Raevonium

Initial Code
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = mInflater.inflate(R.layout.item, parent, false);
((TextView) convertView.findViewById([position]);
((ImageView) convertView.findViewById(
(position & 1) == 1 ? mIcon1 : mIcon2);
return convertView;

Initial URL

Initial Description
The right way (According to Google I/O-10) to use getView with the convertView-param within a custom adapter class.

Initial Title
Using getView and convertView in Android

Initial Tags

Initial Language