當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。