Comments (3)
this in BaseActivity have worked for me
protected void setupToolbar() {
if (toolbar != null) {
setSupportActionBar(toolbar);
toolbar.setNavigationIcon(R.drawable.ic_menu_white);
navigationView.setNavigationItemSelectedListener(
new NavigationView.OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(MenuItem menuItem) {
int position = -1;
switch (menuItem.getItemId()) {
case R.id.menu_foo_1:
#
break;
}
drawerLayout.closeDrawer(Gravity.LEFT);
return false;
}
});
}
}
from instamaterial.
*Note *, Replace this on BaseDrawerActivity
@Override protected void setupToolbar() { super.setupToolbar(); if (getToolbar() != null) { getToolbar().setNavigationOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { drawerLayout.openDrawer(Gravity.LEFT); } }); vNavigation.setNavigationItemSelectedListener( new NavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(MenuItem menuItem) { int position = -1; switch (menuItem.getItemId()) { case R.id.news_feed: Snackbar.make(getCurrentFocus(), "Clicked!", Snackbar.LENGTH_SHORT).show(); break; } drawerLayout.closeDrawer(Gravity.LEFT); return false; } }); } }
from instamaterial.
thank you let me do that
On Wed, May 11, 2016 at 1:43 PM, Tinashe [email protected] wrote:
*Note *, Replace this on BaseDrawerActivity
@OverRide
protected void setupToolbar() {
super.setupToolbar();
if (getToolbar() != null) {
getToolbar().setNavigationOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View v) {
drawerLayout.openDrawer(Gravity.LEFT);
}
});
vNavigation.setNavigationItemSelectedListener(
new NavigationView.OnNavigationItemSelectedListener() {
@OverRide
public boolean onNavigationItemSelected(MenuItem menuItem) {
int position = -1;
switch (menuItem.getItemId()) {
case R.id.news_feed:
Snackbar.make(getCurrentFocus(), "Clicked!", Snackbar.LENGTH_SHORT).show();break; } drawerLayout.closeDrawer(Gravity.LEFT); return false; } }); } }
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#20 (comment)
from instamaterial.
Related Issues (20)
- Crash at Camera Preview HOT 1
- Please don't tell me this is dead :(
- how to make eidtText move with soft keyboard
- Failed to resolve:com.commonsware.cwac:camera:0.7+ HOT 1
- Error: Suspicious namespace and prefix combination [NamespaceTypo] HOT 1
- Currently developing the app asking about upload image or json data from web? HOT 5
- I could not see any videos
- Application link
- Preview mode must have started before you can take a picture
- on Able to detect Header expand and collapse
- news?
- Crash at TakePhotoActivity
- Warning : requestLayout() improperly called HOT 1
- F-Droid
- How do you eliminate the app name in your toolbar? HOT 1
- Bug in InstaMaterial App: my feed, news, setting, and all features not working #44
- Adding important guideline documents
- Updated documentation HOT 2
- Add a private constructor in the Utils class to hide the implicit public one. HOT 1
- Refactor this method to not always return the same value
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instamaterial.