/** * get all drawerItems of the current drawer * * @return */ public List<IDrawerItem> getDrawerItems() { return mDrawerBuilder.getItemAdapter().getAdapterItems(); }
/** * retrieves a flat list of the items in the adapter, respecting subitems regardless of there current visibility * * @param adapter the adapter instance * @param predicate predicate against which each item will be checked before adding it to the result * @return list of items in the adapter that apply to the predicate */ public static List<IItem> getAllItems(final IItemAdapter adapter, IPredicate predicate) { return getAllItems(adapter.getAdapterItems(), true, false, predicate); }
/** * counts the items in the adapter, respecting subitems regardless of there current visibility * * @param adapter the adapter instance * @param countHeaders if true, headers will be counted as well * @return number of items in the adapter */ public static int countItems(final IItemAdapter adapter, boolean countHeaders) { return countItems(adapter.getAdapterItems(), countHeaders, false, null); }
/** * counts the items in the adapter, respecting subitems regardless of there current visibility * * @param adapter the adapter instance * @param predicate predicate against which each item will be checked before counting it * @return number of items in the adapter that apply to the predicate */ public static int countItems(final IItemAdapter adapter, IPredicate predicate) { return countItems(adapter.getAdapterItems(), true, false, predicate); }
/** * retrieves a flat list of the items in the adapter, respecting subitems regardless of there current visibility * * @param adapter the adapter instance * @param countHeaders if true, headers will be counted as well * @return list of items in the adapter */ public static List<IItem> getAllItems(final IItemAdapter adapter, boolean countHeaders) { return getAllItems(adapter.getAdapterItems(), countHeaders, false, null); }