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


C# ActionBar.SetDisplayShowHomeEnabled方法代码示例

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


在下文中一共展示了ActionBar.SetDisplayShowHomeEnabled方法的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;
 }
开发者ID:paulombcosta,项目名称:mono-mobilis,代码行数:27,代码来源:ResponseActivity.cs

示例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;
                }
            });
        }
开发者ID:paulombcosta,项目名称:mono-mobilis,代码行数:50,代码来源:CoursesActivity.cs

示例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;
                }
            });
        }
开发者ID:paulombcosta,项目名称:mono-mobilis,代码行数:49,代码来源:DiscussionActivity.cs


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