mirror of
https://github.com/MinimalBible/MinimalBible-Legacy
synced 2024-12-22 14:48:25 -05:00
Navbar for download activity now displays things from jsword!
This commit is contained in:
parent
fd6c063079
commit
1380a66f88
@ -2,6 +2,8 @@ package org.bspeice.minimalbible.activities.downloader;
|
||||
|
||||
import org.bspeice.minimalbible.R;
|
||||
import org.bspeice.minimalbible.activities.BaseNavigationDrawerFragment;
|
||||
import org.crosswire.jsword.book.BookCategory;
|
||||
import org.crosswire.jsword.book.BookFilters;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@ -13,6 +15,10 @@ import android.widget.ListView;
|
||||
|
||||
public class DownloadNavDrawerFragment extends BaseNavigationDrawerFragment {
|
||||
|
||||
private final BookCategory[] displayCategories = {BookCategory.BIBLE, BookCategory.COMMENTARY,
|
||||
BookCategory.DICTIONARY, BookCategory.IMAGES, BookCategory.MAPS
|
||||
};
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
@ -26,12 +32,15 @@ public class DownloadNavDrawerFragment extends BaseNavigationDrawerFragment {
|
||||
selectItem(position);
|
||||
}
|
||||
});
|
||||
|
||||
String[] sCategories = new String[displayCategories.length];
|
||||
for (int i = 0; i < displayCategories.length; i++) {
|
||||
sCategories[i] = displayCategories[i].toString();
|
||||
}
|
||||
|
||||
mDrawerListView.setAdapter(new ArrayAdapter<String>(getActionBar()
|
||||
.getThemedContext(), android.R.layout.simple_list_item_1,
|
||||
android.R.id.text1, new String[] {
|
||||
getString(R.string.title_section1),
|
||||
getString(R.string.title_section2),
|
||||
getString(R.string.title_section3), }));
|
||||
android.R.id.text1, sCategories));
|
||||
mDrawerListView.setItemChecked(mCurrentSelectedPosition, true);
|
||||
return mDrawerListView;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user