Ejemplo n.º 1
0
        protected void custom_tabs_activit_manager_CustomTabsServiceConnected
        (
            Content.ComponentName name,
            CustomTabsClient client
        )
        {
            builder = new CustomTabsIntent.Builder(custom_tabs_activit_manager.Session);
            builder.EnableUrlBarHiding();

            if (CustomTabsConfiguration.IsWarmUpUsed)
            {
                long flags = -1;
                client.Warmup(flags);
            }

            if (CustomTabsConfiguration.AreAnimationsUsed)
            {
                builder.SetStartAnimations
                (
                    activity,
                    Xamarin.Auth.Resource.Animation.slide_in_right,
                    Xamarin.Auth.Resource.Animation.slide_out_left
                );
                builder.SetExitAnimations
                (
                    activity,
                    global::Android.Resource.Animation.SlideInLeft,
                    global::Android.Resource.Animation.SlideOutRight
                );
            }

            custom_tabs_activit_manager.LaunchUrl(uri.ToString(), builder.Build());

            return;
        }
        protected void custom_tabs_activit_manager_CustomTabsServiceConnected
        (
            Content.ComponentName name,
            CustomTabsClient client
        )
        {
            custom_tabs_intent_builder = new CustomTabsIntent.Builder(custom_tabs_activity_manager.Session);

            custom_tabs_intent_builder.EnableUrlBarHiding();

            if (CustomTabsConfiguration.IsWarmUpUsed)
            {
                System.Diagnostics.Debug.WriteLine("CustomTabsActivityManager.WarmUp()");
                client.Warmup(0);
                //custom_tabs_activity_manager.Warmup();
            }

            if (CustomTabsConfiguration.IsPrefetchUsed)
            {
                System.Diagnostics.Debug.WriteLine("CustomTabsActivityManager PREFETCH");
                custom_tabs_activity_manager.MayLaunchUrl(uri.ToString(), null, null);
            }

            if (CustomTabsConfiguration.AreAnimationsUsed)
            {
                custom_tabs_intent_builder.SetStartAnimations
                (
                    activity,
                    Xamarin.Auth.Resource.Animation.slide_in_right,
                    Xamarin.Auth.Resource.Animation.slide_out_left
                );
                custom_tabs_intent_builder.SetExitAnimations
                (
                    activity,
                    global::Android.Resource.Animation.SlideInLeft,
                    global::Android.Resource.Animation.SlideOutRight
                );
            }

            custom_tabs_activity_manager.LaunchUrl(uri.ToString(), custom_tabs_intent_builder.Build());

            return;
        }