0
我想處理我的自定義標誌點擊ActionBar。Xamarin.Android ActionBar標誌點擊監聽器
<style name="ReadingsActionBarTheme"
parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/Readings.ActionBar</item>
<item name="logo">@drawable/back</item>
<item name="android:logo">@drawable/back</item>
風格
我必須編譯的Android 4.4系統,這裏是我的嘗試:
public override bool OnOptionsItemSelected(Xamarin.ActionbarSherlockBinding.Views.IMenuItem item)
{
switch (item.ItemId)
{
case Android.Resource.Id.Home:
var homeActivity = new Intent(this, typeof(HomeActivity));
StartActivity(homeActivity); ;
break;
}
return base.OnOptionsItemSelected(item);
}
任何解決方案?