本文整理汇总了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);
}
示例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);
}
示例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));
}
}
示例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);
}
示例5: OnTabUnselected
public void OnTabUnselected(ActionBar.Tab tab, FragmentTransaction ft)
{
this.RunOnUiThread(() =>
{
Toast.MakeText(this, "OnTabUnselected " + tab.Text, ToastLength.Long).Show();
});
}
示例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;
}
示例7: initializeActionBar
protected void initializeActionBar(){
if(playerEnabled){
actionBar = (ActionBar) GameObject.FindObjectOfType (typeof (ActionBar));
actionBar.setPlayer(this);
actionBar.initializeBasicAttack();
}
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例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();
}
示例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);
}
}
示例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);
}
示例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));
}
}
示例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;
}