Download now using the new Navbar

This commit is contained in:
Bradlee Speice 2014-07-21 20:42:21 -04:00
parent 54c3dd01a9
commit d61f9057b6

View File

@ -8,8 +8,10 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.ListView; import android.widget.ListView;
import org.bspeice.minimalbible.Injector;
import org.bspeice.minimalbible.R; import org.bspeice.minimalbible.R;
import org.bspeice.minimalbible.activity.BaseNavigationDrawerFragment; import org.bspeice.minimalbible.activity.BaseNavigationDrawerFragment;
import org.bspeice.minimalbible.activity.NavDrawerAdapter;
import org.crosswire.jsword.book.BookCategory; import org.crosswire.jsword.book.BookCategory;
import java.util.List; import java.util.List;
@ -25,7 +27,7 @@ public class DownloadNavDrawerFragment extends BaseNavigationDrawerFragment {
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
((DownloadActivity)getActivity()).inject(this); ((Injector)getActivity()).inject(this);
mDrawerListView = (ListView) inflater.inflate( mDrawerListView = (ListView) inflater.inflate(
R.layout.fragment_navigation_drawer, container, false); R.layout.fragment_navigation_drawer, container, false);
@ -38,9 +40,8 @@ public class DownloadNavDrawerFragment extends BaseNavigationDrawerFragment {
} }
}); });
mDrawerListView.setAdapter(new ArrayAdapter<BookCategory>(getActionBar() mDrawerListView.setAdapter(new NavDrawerAdapter<BookCategory>(getActivity(),
.getThemedContext(), android.R.layout.simple_list_item_1, validCategories));
android.R.id.text1, validCategories));
mDrawerListView.setItemChecked(mCurrentSelectedPosition, true); mDrawerListView.setItemChecked(mCurrentSelectedPosition, true);
return mDrawerListView; return mDrawerListView;
} }