Close the drawer on item select

This commit is contained in:
Bradlee Speice 2014-12-28 21:33:49 -05:00
parent ac43b20fcd
commit 42bbbd00f7

View File

@ -3,6 +3,7 @@ package org.bspeice.minimalbible.activity.downloader;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentManager;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
@ -47,6 +48,9 @@ public class DownloadActivity extends BaseActivity implements
@InjectView(R.id.toolbar) @InjectView(R.id.toolbar)
Toolbar toolbar; Toolbar toolbar;
@InjectView(R.id.drawer_layout)
DrawerLayout drawerLayout;
private ObjectGraph daObjectGraph; private ObjectGraph daObjectGraph;
/** /**
@ -127,6 +131,8 @@ public class DownloadActivity extends BaseActivity implements
.replace(R.id.content, .replace(R.id.content,
BookListFragment.newInstance(validCategories.get(position))) BookListFragment.newInstance(validCategories.get(position)))
.commit(); .commit();
drawerLayout.closeDrawers();
} }
private void setTitle(String title) { private void setTitle(String title) {