create a regular adapter; in the create_view function, inflate the xml layout according to the type of string.
eg
@Override public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) context .getSystemService(Context.LAYOUT_INFLATER_SERVICE); if (position % 2 == 0 ) xml_type = R.layout.row_one else xml_type = R.layout.row_two View rowView = inflater.inflate(xml_type, parent, false); }
Jow
source share