示例#1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_serviceconnection);

            customTabActivityHelper = new CustomTabActivityHelper();
            customTabActivityHelper.ConnectionCallback = this; //IConnectionCallback

            mUrlEditText                = FindViewById <EditText>(Resource.Id.url);
            mMayLaunchUrlButton         = FindViewById <Button>(Resource.Id.button_may_launch_url);
            mMayLaunchUrlButton.Enabled = false;
            mMayLaunchUrlButton.SetOnClickListener(this);

            FindViewById <Button>(Resource.Id.start_custom_tab).SetOnClickListener(this);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_custom_ui);

            custom_tab_activity_helper = new CustomTabActivityHelper();
            FindViewById <Button>(Resource.Id.start_custom_tab).SetOnClickListener(this);

            mUrlEditText                     = FindViewById <EditText>(Resource.Id.url);
            mCustomTabColorEditText          = FindViewById <EditText>(Resource.Id.custom_toolbar_color);
            mCustomTabSecondaryColorEditText = FindViewById <EditText>(Resource.Id.custom_toolbar_secondary_color);
            mShowActionButtonCheckbox        = FindViewById <CheckBox>(Resource.Id.custom_show_action_button);
            mAddMenusCheckbox                = FindViewById <CheckBox>(Resource.Id.custom_add_menus);
            mShowTitleCheckBox               = FindViewById <CheckBox>(Resource.Id.show_title);
            mCustomBackButtonCheckBox        = FindViewById <CheckBox>(Resource.Id.custom_back_button);
            mAutoHideAppBarCheckbox          = FindViewById <CheckBox>(Resource.Id.auto_hide_checkbox);
            mAddDefaultShareCheckbox         = FindViewById <CheckBox>(Resource.Id.add_default_share);
            mToolbarItemCheckbox             = FindViewById <CheckBox>(Resource.Id.add_toolbar_item);
        }