If I return a View of type Layout from BaseAdapter::getView I'm
immediately greeting with the error "The application XXX has stopped
unexpectedly ... " However, if I return an ImageView or TextView the
error is averted. Does anyone know if this is a limitation of
GridView?
public class GridAdapter extends BaseAdapter {
public GridAdapter() {
}
public View getView(int position, View convertView, ViewGroup
parent) {
if (convertView == null) {
convertView = new LinearLayout(ParentActivity.this);
convertView.setLayoutParams(new
LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
}
return convertView;
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---