private long getParentOrderPK(int position) { long pk = 0; for (int i = position; i >= 0; i--) { if (adapter.getItemViewType(i) == OrdersData.TYPE_MULTICAMPAIGH_HEADER) { pk = (Long) adapter.getItem(i); return pk; } } return pk; }
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { long parentOrder = getParentOrderPK(position); gotoOrder(adapter.getItem(position), parentOrder); }