We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You code well!
And i have a very simple question to ask you.
app/src/main/java/io/github/froger/instamaterial/ui/adapter/GlobalMenuAdapter.java
you set the drawer items , but how can i add a click event?
The text was updated successfully, but these errors were encountered:
you can try this : GlobalMenuView.setOnItemClickListener....
Sorry, something went wrong.
Oh ,Thank You.
@BaseActivity private void setupDrawer() { DrawerMenuView menuView = new DrawerMenuView(this); menuView.setOnHeaderClickListener(this); drawerLayout = DrawerLayoutInstaller.from(this) .drawerRoot(R.layout.drawer_root) .drawerLeftView(menuView) .drawerLeftWidth(Utils.dpToPx(300)) .withNavigationIconToggler(getToolbar()) .build(); menuView.setOnItemClickListener(new DrawerItemClickListener()); } private class DrawerItemClickListener implements ListView.OnItemClickListener { @OverRide public void onItemClick(AdapterView<?> parent, View view, int position, long id) { int mPosition = (position - 1); selectedItem(mPosition); drawerLayout.closeDrawer(Gravity.START); } }
protected void selectedItem(int selectedItem){}
@MainActivity @OverRide protected void selectedItem(int selectedItem) { Toast.makeText(MainActivity.this, "Position = "+selectedItem, 1).show(); }
No branches or pull requests
You code well!
And i have a very simple question to ask you.
app/src/main/java/io/github/froger/instamaterial/ui/adapter/GlobalMenuAdapter.java
you set the drawer items , but how can i add a click event?
The text was updated successfully, but these errors were encountered: