Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

SherlockActionBar Home on App Icon Click

$
0
0

Hi everyone,

I'm trying to return to the main Activity when clicking on the Icon of the Action Bar. For backwards compatibility I'm running Sherlock Action Bar. I'm able to show the Back Button () and to generate the click event and handling it in OnOptionsItemSelected(IMenuItem item). But how do I get the ID of the MenuItem to look for? What do I have to put where I state here "xxx"? In non xamarin exampels they state "android.R.id.home".

public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
                case xxx
                    this.Finish();
                    break;
            }

            return base.OnOptionsItemSelected(item);
        }

My target Framework is 2.3. Thank you very much for your help. I did allready spend a lot of time on this issue...


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>