use of butter.droid.ui.main.navigation.NavigationDrawerFragment.ProviderNavDrawerItem in project butter-android by butterproject.
the class NavigationDrawerPresenterImpl method getNavigationItems.
private List<NavigationDrawerFragment.AbsNavDrawerItem> getNavigationItems() {
List<AbsNavDrawerItem> navItems = new ArrayList<>();
navItems.add(new HeaderNavDrawerItem());
ProviderWrapper[] providers = providerManager.getProviders();
for (int i = 0; i < providers.length; i++) {
final ProviderWrapper provider = providers[i];
navItems.add(new ProviderNavDrawerItem(provider.getDisplayName(), provider.getIcon(), i));
}
navItems.add(new ScreenNavDrawerItem(R.string.preferences, R.drawable.ic_nav_settings, PreferencesActivity.class));
navItems.get(selectedPosition).setSelected(true);
return navItems;
}
Aggregations