mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-11-05 07:38:20 -05:00
Show the drawer hamburger icon
This commit is contained in:
parent
42bbbd00f7
commit
d21cf4777f
@ -4,6 +4,7 @@ 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.v4.widget.DrawerLayout;
|
||||||
|
import android.support.v7.app.ActionBarDrawerToggle;
|
||||||
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;
|
||||||
@ -87,6 +88,14 @@ public class DownloadActivity extends BaseActivity implements
|
|||||||
|
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
|
||||||
|
// Set up the hamburger menu
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setHomeButtonEnabled(true);
|
||||||
|
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawerLayout,
|
||||||
|
toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
|
||||||
|
drawerLayout.setDrawerListener(toggle);
|
||||||
|
toggle.syncState();
|
||||||
|
|
||||||
navigationContent.setAdapter(
|
navigationContent.setAdapter(
|
||||||
new ArrayAdapter<>(this, android.R.layout.simple_list_item_1,
|
new ArrayAdapter<>(this, android.R.layout.simple_list_item_1,
|
||||||
validCategories));
|
validCategories));
|
||||||
|
@ -3,6 +3,7 @@ package org.bspeice.minimalbible.activity.viewer;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.widget.DrawerLayout;
|
import android.support.v4.widget.DrawerLayout;
|
||||||
|
import android.support.v7.app.ActionBarDrawerToggle;
|
||||||
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;
|
||||||
@ -89,7 +90,17 @@ public class BibleViewer extends BaseActivity implements Injector {
|
|||||||
ButterKnife.inject(this);
|
ButterKnife.inject(this);
|
||||||
|
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
|
||||||
|
// Set up the hamburger menu
|
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
getSupportActionBar().setHomeButtonEnabled(true);
|
||||||
|
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawerLayout,
|
||||||
|
toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
|
||||||
|
drawerLayout.setDrawerListener(toggle);
|
||||||
|
toggle.syncState();
|
||||||
|
|
||||||
setInsetToolbar(toolbar);
|
setInsetToolbar(toolbar);
|
||||||
|
|
||||||
bibleMenu.setBible(mainBook);
|
bibleMenu.setBible(mainBook);
|
||||||
bibleContent.setBook(mainBook, prefs);
|
bibleContent.setBook(mainBook, prefs);
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
<item name="android:textColorSecondary">@color/textColorPrimary</item>
|
<item name="android:textColorSecondary">@color/textColorPrimary</item>
|
||||||
<!-- Overflow menu text item color -->
|
<!-- Overflow menu text item color -->
|
||||||
<item name="android:textColor">@color/textColor</item>
|
<item name="android:textColor">@color/textColor</item>
|
||||||
|
<!-- Hamburger bar animation -->
|
||||||
|
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Almost re-use style from Widget.Holo.Button.Borderless -->
|
<!-- Almost re-use style from Widget.Holo.Button.Borderless -->
|
||||||
@ -21,6 +23,11 @@
|
|||||||
-->
|
-->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
|
||||||
|
<item name="spinBars">true</item>
|
||||||
|
<item name="color">@color/textColorPrimary</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="MinimalBibleBase.NavigationDrawer" parent="MinimalBibleBase">
|
<style name="MinimalBibleBase.NavigationDrawer" parent="MinimalBibleBase">
|
||||||
<item name="android:background">@color/navigationBackground</item>
|
<item name="android:background">@color/navigationBackground</item>
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user