当前位置: 首页>>代码示例>>C#>>正文


C# ActionBar类代码示例

本文整理汇总了C#中ActionBar的典型用法代码示例。如果您正苦于以下问题:C# ActionBar类的具体用法?C# ActionBar怎么用?C# ActionBar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ActionBar类属于命名空间,在下文中一共展示了ActionBar类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TabOnTabSelected

        void TabOnTabSelected(object sender, ActionBar.TabEventArgs tabEventArgs)
        {
            var tab = (ActionBar.Tab)sender;

            Fragment frag = _fragments[tab.Position];
            tabEventArgs.FragmentTransaction.Replace(Resource.Id.frameLayout1, frag);
        }
开发者ID:jj09,项目名称:ShoppingPad,代码行数:7,代码来源:MainActivity.cs

示例2: OnTabSelected

		public void OnTabSelected (ActionBar.Tab tab, FragmentTransaction ft) 
		{
			TitlesFragment titleFrag = (TitlesFragment) FragmentManager.FindFragmentById (Resource.Id.frag_title);
			titleFrag.PopulateTitles (tab.Position);
		
			titleFrag.SelectPosition (0);
		}
开发者ID:CHANDAN145,项目名称:monodroid-samples,代码行数:7,代码来源:MainActivity.cs

示例3: SetupTabs

 void SetupTabs(ActionBar actionBar) {
     for (int i = 0; i < actionBar.TabCount; i++) {
         ActionBar.Tab tab = actionBar.GetTabAt(i);
         if (TabIsEmpty(tab)) 
             TabSetup(tab, GetTabIconId(i));
     }
 }
开发者ID:RMDesenvolvimento,项目名称:Xamarin,代码行数:7,代码来源:TabRenderer.cs

示例4: TabOnTabSelected

 void TabOnTabSelected(object sender, ActionBar.TabEventArgs tabEventArgs)
 {
     ActionBar.Tab tab = (ActionBar.Tab)sender;
     Log.Debug(Tag, "The tab {0} has been selected.", tab.Text);
     Fragment frag = _fragments[tab.Position];
     tabEventArgs.FragmentTransaction.Replace(Resource.Id.frameLayout1, frag);
 }
开发者ID:RamBachkheti,项目名称:Xamarin-Samples,代码行数:7,代码来源:MainActivity.cs

示例5: OnTabUnselected

 public void OnTabUnselected(ActionBar.Tab tab, FragmentTransaction ft)
 {
     this.RunOnUiThread(() =>
     {
         Toast.MakeText(this, "OnTabUnselected " + tab.Text, ToastLength.Long).Show();
     });
 }
开发者ID:cirk0r,项目名称:PW,代码行数:7,代码来源:MainActivity.cs

示例6: OnCreate

 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate(bundle);
     SetContentView(Resource.Layout.Response);
     userDao = new UserDao();
     postService = new PostService();
     audioService = new SendAudioService();
     deliverPostService = new SendPostService();
     actionBar = SupportActionBar;
     actionBar.SetHomeButtonEnabled(false);
     actionBar.SetDisplayHomeAsUpEnabled(false);
     actionBar.SetDisplayUseLogoEnabled(false);
     actionBar.SetDisplayShowHomeEnabled(false);
     actionBar.Title = "Responder";
     chronometer = FindViewById<TextView>(Resource.Id.recording_lenght);
     previewRecord = FindViewById<ImageView>(Resource.Id.record_image);
     message = FindViewById<EditText>(Resource.Id.criar_topico_conteudo);
     submit = FindViewById<Button>(Resource.Id.criar_topico_submit);
     submit.Click += new System.EventHandler(submit_Click);
     record = FindViewById<ImageButton>(Resource.Id.btn_gravar);
     record.Click += new System.EventHandler(record_Click);
     ServiceLocator.Dispatcher = new DispatchAdapter(this);
     ServiceLocator.Recorder = new RecordAdapter();
     timer = new System.Timers.Timer(1000);
     timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
     timer.Enabled = true;
 }
开发者ID:paulombcosta,项目名称:mono-mobilis,代码行数:27,代码来源:ResponseActivity.cs

示例7: initializeActionBar

	protected void initializeActionBar(){
		if(playerEnabled){
			actionBar = (ActionBar) GameObject.FindObjectOfType (typeof (ActionBar));
			actionBar.setPlayer(this);
			actionBar.initializeBasicAttack();
		}
	}
开发者ID:marouen-lamiri,项目名称:Second-Soul,代码行数:7,代码来源:Player.cs

示例8: ToActionBar

 /// <summary>
 /// Gets the action bar for selecting the different options.
 /// </summary>
 public static ActionBar ToActionBar(bool isHorizontal)
 {
     Load();
     ActionBar result = new ActionBar(isHorizontal);
     AddToggles(result);
     return result;
 }
开发者ID:fgeraci,项目名称:CS195-Core,代码行数:10,代码来源:FillInOptionsSerializer.cs

示例9: OnTabSelected

 public void OnTabSelected(ActionBar.Tab tab, FragmentTransaction ft)
 {
     StationInventoryListFragment fragment = tab.Tag as StationInventoryListFragment;
     if (fragment != null)
     {
         ft.Replace(R.Ids.stationInventoryFragmentContainer, fragment);
     }
 }
开发者ID:sschocke,项目名称:JGCompanion,代码行数:8,代码来源:StationInventoryActivity.cs

示例10: OnTabSelected

 public void OnTabSelected(ActionBar.Tab tab, FragmentTransaction ft)
 {
     Fragment fragment = tab.Tag as Fragment;
     if (fragment != null)
     {
         ft.Replace(R.Ids.itemDetailFragmentContainer, fragment);
     }
 }
开发者ID:sschocke,项目名称:JGCompanion,代码行数:8,代码来源:ItemDetailActivity.cs

示例11: OnHomeTabSelected

        private void OnHomeTabSelected(object sender, ActionBar.TabEventArgs e)
        {
            var alertDialogBuilder = new AlertDialog.Builder(this);
            alertDialogBuilder.SetMessage("Home tab selected!");

            var dialog = alertDialogBuilder.Create();
            dialog.Show();
        }
开发者ID:wmeints,项目名称:Presentations,代码行数:8,代码来源:MainActivity.cs

示例12: OnTabSelected

 public void OnTabSelected(ActionBar.Tab tab, FragmentTransaction ft)
 {
     PilotListCounterFragment fragment = tab.Tag as PilotListCounterFragment;
     if (fragment != null)
     {
         ft.Replace(R.Ids.pilotsOnlineFragmentContainer, fragment);
     }
 }
开发者ID:sschocke,项目名称:JGCompanion,代码行数:8,代码来源:OnlinePilotsActivity.cs

示例13: OnTabSelected

		public void OnTabSelected (ActionBar.Tab tab, FragmentTransaction ft)
		{
			FragmentManager.PopBackStack (null, FragmentManager.PopBackStackInclusive);

			Log.Debug (Tag, "The tab {0} has been selected.", tab.Text);
			Fragment frag = _fragments [tab.Position];
			ft.Replace (Resource.Id.content_frame, frag);
		}
开发者ID:ctsxamarintraining,项目名称:Xamarin,代码行数:8,代码来源:MainActivity.cs

示例14: AddToggles

    /// <summary>
    /// Adds the option toggles to the given ActionBar.
    /// </summary>
    public static void AddToggles(ActionBar bar)
    {
        foreach (IRoleFillerRule rule in AllRules)
        {
            IRoleFillerRule local = rule;
            bar.AddToggle(local.Name, (bool b) => MarkActive(local, b), ActiveRules.Contains(local));
        }

    }
开发者ID:fgeraci,项目名称:CS195-Core,代码行数:12,代码来源:FillInOptionsSerializer.cs

示例15: GetViewPageTab

 public static ActionBar.Tab GetViewPageTab(this ViewPager viewPager, ActionBar actionBar, string name)
 {
     var tab = actionBar.NewTab();
     tab.SetText(name);
     tab.TabSelected += (o, e) =>
     {
         viewPager.SetCurrentItem(actionBar.SelectedNavigationIndex, false);
     };
     return tab;
 }
开发者ID:BratislavDimitrov,项目名称:monodroid-samples,代码行数:10,代码来源:GenericFragmentPagerAdaptor.cs


注:本文中的ActionBar类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。