xamarin.android - Navigation Drawer back button Xamarin -
i using binding awesome material drawer library mikepenz.
i have implemented navigation drawer library , have managed change hamburger menu arrow when go level deep. have problems arrow work correctly. when click on arrow, rather going previous page, opens navigation drawer.
after looking original library, have identified, following code responsible manage arrow button. appreciate , if can me bit write listener code in c#.
.withondrawernavigationlistener(new drawer.ondrawernavigationlistener() { @override public boolean onnavigationclicklistener(view clickedview) { //this method called if arrow icon shown. hamburger automatically managed materialdrawer //if arrow shown. close activity advancedactivity.this.finish(); //return true if have consumed event return true; } })
here binding libray use : materialdrawer-xamarin
and link original library : materialdrawer
try this:
var result = new drawerbuilder() .withactivity(this) .adddraweritems( //add items here new dividerdraweritem() ) .withondrawernavigationlistener(this);
and implement drawer.iondrawernavigationlistener
in activity this:
public bool onnavigationclicklistener(view clickedview) { this.finish(); return true; }
Comments
Post a Comment