How to Finish / Kill the Activity from Action Bar Back Button

MohanasundharamMohanasundharam Member ✭✭✭

I have trouble with Finish / Kill the Activity when pressing the ActionBar Back Button.

//Activity Attribute

[Activity(Label = "MainPageAccordianList", ParentActivity = typeof(MainActivity), Theme = "@style/MyTheme")]

//Action Bar Code

var toolbar = FindViewById(Resource.Id.maintoolbar);
SetActionBar(toolbar);
ActionBar.Title = "Accordian ListView";
ActionBar.SetDisplayHomeAsUpEnabled(true);
ActionBar.SetHomeButtonEnabled(true);

Best Answer

Answers

Sign In or Register to comment.