Beispiel #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            root_view = FindViewById <ViewGroup>(Resource.Id.root_view);

            btn_snackbar_single_line                    = FindViewById <Button>(Resource.Id.btn_snackbar_single_line);
            btn_snackbar_single_line_custom_view        = FindViewById <Button>(Resource.Id.btn_snackbar_single_line_custom_view);
            btn_snackbar_single_line_action             = FindViewById <Button>(Resource.Id.btn_snackbar_single_line_action);
            btn_snackbar_single_line_action_custom_view = FindViewById <Button>(Resource.Id.btn_snackbar_single_line_action_custom_view);

            btn_snackbar_multiline                    = FindViewById <Button>(Resource.Id.btn_snackbar_multiline);
            btn_snackbar_multiline_custom_view        = FindViewById <Button>(Resource.Id.btn_snackbar_multiline_custom_view);
            btn_snackbar_multiline_action             = FindViewById <Button>(Resource.Id.btn_snackbar_multiline_action);
            btn_snackbar_multiline_action_custom_view = FindViewById <Button>(Resource.Id.btn_snackbar_multiline_action_custom_view);
            btn_snackbar_multiline_long_action        = FindViewById <Button>(Resource.Id.btn_snackbar_multiline_long_action);

            btn_snackbar_announcement = FindViewById <Button>(Resource.Id.btn_snackbar_announcement);

            btn_snackbar_single_line.SetOnClickListener(this);
            btn_snackbar_single_line_custom_view.SetOnClickListener(this);
            btn_snackbar_single_line_action.SetOnClickListener(this);
            btn_snackbar_single_line_action_custom_view.SetOnClickListener(this);

            btn_snackbar_multiline.SetOnClickListener(this);
            btn_snackbar_multiline_custom_view.SetOnClickListener(this);
            btn_snackbar_multiline_action.SetOnClickListener(this);
            btn_snackbar_multiline_action_custom_view.SetOnClickListener(this);
            btn_snackbar_multiline_long_action.SetOnClickListener(this);

            btn_snackbar_announcement.SetOnClickListener(this);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            show_drawer_button        = FindViewById <Microsoft.OfficeUIFabric.Button>(Resource.Id.show_drawer_button);
            show_drawer_dialog_button = FindViewById <Microsoft.OfficeUIFabric.Button>(Resource.Id.show_drawer_dialog_button);

            show_drawer_button.Click += delegate {
                var drawerDemo = Drawer.Companion.NewInstance(Resource.Layout.demo_drawer_content);
                drawerDemo.Show(SupportFragmentManager, null);
            };

            show_drawer_dialog_button.Click += delegate {
                var drawerDialogDemo = new DrawerDialog(this);
                drawerDialogDemo.DrawerContentCreated += DrawerDialogDemo_DrawerContentCreated;
                drawerDialogDemo.SetContentView(Resource.Layout.demo_drawer_content);
                drawerDialogDemo.Show();
            };
        }