public AdapterClass(Context a, int resourceID, List < Info > entries) {
super(a, resourceID, entries);
this.layoutResource = resourceID;
}
@
Override
public View getView(int position, View convertView, ViewGroup parent) {
final Object custom = getItem(position);
LinearLayout rowView = null;
if (convertView == null) {
rowView = new LinearLayout(getContext());
LayoutInflater vi = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
vi.inflate(layoutResource, rowView);
} else
rowView = (LinearLayout) convertView;
if (custom != null) {
}
return rowView;
}
I am passing two different layouts at runtime, how can i identify which layout i am passing in the getView()
method. I am using ArrayAdapter
.