/** * Adds view for item to items layout * @param index the item index * @param first the flag indicates if view should be first * @return true if corresponding item exists and is added */ private boolean addViewItem(int index, boolean first) { View view = getItemView(index); if (view != null) { if (first) { itemsLayout.addView(view, 0); } else { itemsLayout.addView(view); } return true; } return false; }
/** * Adds view for item to items layout * * @param index * the item index * @param first * the flag indicates if view should be first * @return true if corresponding item exists and is added */ private boolean addViewItem(int index, boolean first) { View view = getItemView(index); if (view != null) { if (first) { itemsLayout.addView(view, 0); } else { itemsLayout.addView(view); } return true; } return false; }