本文整理汇总了C#中ActionBar.SetHomeButtonEnabled方法的典型用法代码示例。如果您正苦于以下问题:C# ActionBar.SetHomeButtonEnabled方法的具体用法?C# ActionBar.SetHomeButtonEnabled怎么用?C# ActionBar.SetHomeButtonEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionBar
的用法示例。
在下文中一共展示了ActionBar.SetHomeButtonEnabled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.SimpleList);
coursesViewModel = new CoursesViewModel();
FindViewById<TextView>(Resource.Id.screen_title).Text = "Cursos Disponíveis";
ListView list = FindViewById<ListView>(Resource.Id.list);
adapter = new SimpleListAdapter<Course>(this, coursesViewModel.listContent);
list.Adapter = adapter;
list.ItemClick += new EventHandler<Android.Widget.AdapterView.ItemClickEventArgs>(list_ItemClick);
actionBar = SupportActionBar;
actionBar.SetHomeButtonEnabled(false);
actionBar.SetDisplayHomeAsUpEnabled(false);
actionBar.SetDisplayUseLogoEnabled(false);
actionBar.SetDisplayShowHomeEnabled(false);
actionBar.Title = "Cursos";
ServiceLocator.Messenger.Subscribe<BaseViewMessage>(m =>
{
switch (m.Content.message)
{
case BaseViewMessage.MessageTypes.CONNECTION_ERROR:
ServiceLocator.Dispatcher.invoke(() =>
{
Toast.MakeText(this, "Erro de conexão", ToastLength.Short).Show();
dialog.Dismiss();
});
break;
case BaseViewMessage.MessageTypes.CLASS_CONNECTION_OK:
ServiceLocator.Dispatcher.invoke(() =>
{
ServiceLocator.Dispatcher.invoke(() =>
{
intent = new Intent(this, typeof(ClassActivity));
StartActivity(intent);
});
});
break;
case BaseViewMessage.MessageTypes.COURSE_CONNECTION_OK:
ServiceLocator.Dispatcher.invoke(() =>
{
//TODO refresh.
});
break;
default:
break;
}
});
}
示例3: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.SimpleList);
discussionViewModel = new DiscussionsViewModel();
FindViewById<TextView>(Resource.Id.screen_title).Text = "Fóruns Disponíveis";
ListView list = FindViewById<ListView>(Resource.Id.list);
adapter = new SimpleListAdapter<Discussion>(this, discussionViewModel.discussions);
list.Adapter = adapter;
list.ItemClick += new System.EventHandler<AdapterView.ItemClickEventArgs>(list_ItemClick);
actionBar = SupportActionBar;
actionBar.SetHomeButtonEnabled(false);
actionBar.SetDisplayHomeAsUpEnabled(false);
actionBar.SetDisplayUseLogoEnabled(false);
actionBar.SetDisplayShowHomeEnabled(false);
actionBar.Title = "Fóruns";
ServiceLocator.Messenger.Subscribe<BaseViewMessage>(m =>
{
switch (m.Content.message)
{
case BaseViewMessage.MessageTypes.CONNECTION_ERROR:
ServiceLocator.Dispatcher.invoke(() =>
{
Toast.MakeText(this, "Erro de conexão", ToastLength.Short).Show();
dialog.Dismiss();
});
break;
case BaseViewMessage.MessageTypes.FUTURE_POSTS_LOADED:
ServiceLocator.Dispatcher.invoke(() =>
{
intent = new Intent(this, typeof(PostActivity));
StartActivity(intent);
});
break;
case BaseViewMessage.MessageTypes.NO_NEW_POSTS:
ServiceLocator.Dispatcher.invoke(() =>
{
Toast.MakeText(this, "Não há novos posts", ToastLength.Short).Show();
dialog.Dismiss();
});
break;
default:
break;
}
});
}