Beispiel #1
0
 public override bool OnMenuItemClick(IMenuItem menuItem)
 {
     if (menuItem.ItemId == Resource.Id.add)
     {
         AddStatusActivity.Enter(this);
     }
     return(true);
 }
Beispiel #2
0
 public override bool OnMenuItemClick(IMenuItem menuItem)
 {
     if (menuItem.ItemId == Resource.Id.search)
     {
         string category = string.Empty;
         if (tv_blog.Selected)
         {
             category = "Blog";
         }
         else if (tv_news.Selected)
         {
             if (newsFragment.currentPosition == 0)
             {
                 category = "Kb";
             }
             else
             {
                 category = "News";
             }
             System.Diagnostics.Debug.Write("position", newsFragment.currentPosition.ToString());
         }
         else if (tv_question.Selected)
         {
             category = "Question";
         }
         else
         {
             category = "Blog";
         }
         SearchResultActivity.Enter(category, this);
     }
     if (menuItem.ItemId == Resource.Id.add)
     {
         if (tv_status.Selected)
         {
             AddStatusActivity.Enter(this);
         }
         else if (tv_question.Selected)
         {
             AddQuestionActivity.Enter(this);
         }
         AlertUtil.ToastShort(this, "添加");
     }
     if (menuItem.ItemId == Resource.Id.setting)
     {
         if (tv_userCenter.Selected)
         {
             SettingActivity.Enter(this);
         }
     }
     return(true);
 }