Ejemplo n.º 1
0
        public void OnClick(View view)
        {
            int viewId = view.Id;
            Uri uri    = Uri.Parse(mUrlEditText.Text.ToString());

            switch (viewId)
            {
            case Resource.Id.button_may_launch_url:
                customTabActivityHelper.MayLaunchUrl(uri, null, null);
                break;

            case Resource.Id.start_custom_tab:
                CustomTabsIntent customTabsIntent = (new CustomTabsIntent.Builder(customTabActivityHelper.Session)).Build();
                new CustomTabActivityHelper().LaunchUrlWithCustomTabsOrFallback
                (
                    this,
                    customTabsIntent,
                    uri,
                    new WebViewFallback()
                );
                break;

            default:
                //Unkown View Clicked
                break;
            }
        }