Exemplo n.º 1
0
        //=================================================================

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            //=================================================================
            //  switching between
            //      embbedded browsers (WebView)
            //  and
            //      Native UI ([Chrome] Custom Tabs)
            //  read the docs about pros and cons
            test_native_ui = true;
            //=================================================================

            ListAdapter = new ArrayAdapter <String>(this, global::Android.Resource.Layout.SimpleListItem1, provider_list);

            // [Chrome] Custom Tabs WarmUp and prefetch
            custom_tab_activity_helper = new global::Android.Support.CustomTabs.Chromium.SharedUtilities.CustomTabActivityHelper();

            global::Xamarin.Auth.CustomTabsConfiguration.ActionLabel                = null;
            global::Xamarin.Auth.CustomTabsConfiguration.MenuItemTitle              = null;
            global::Xamarin.Auth.CustomTabsConfiguration.AreAnimationsUsed          = true;
            global::Xamarin.Auth.CustomTabsConfiguration.IsShowTitleUsed            = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsUrlBarHidingUsed         = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsCloseButtonIconUsed      = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsActionButtonUsed         = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsActionBarToolbarIconUsed = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsDefaultShareMenuItemUsed = false;
            global::Xamarin.Auth.CustomTabsConfiguration.ToolbarColor               = global::Android.Graphics.Color.Orange;

            return;
        }
Exemplo n.º 2
0
        //=================================================================

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            //=================================================================
            //  switching between
            //      embbedded browsers (WebView)
            //  and
            //      Native UI ([Chrome] Custom Tabs)
            //  read the docs about pros and cons
            test_native_ui = true;
            //=================================================================

            ListAdapter = new ArrayAdapter <String>(this, global::Android.Resource.Layout.SimpleListItem1, provider_list);

            // Step 2.2 Customizing the UI - Native UI [OPTIONAL]
            // [Chrome] Custom Tabs WarmUp and prefetch
            custom_tab_activity_helper = new global::Android.Support.CustomTabs.Chromium.SharedUtilities.CustomTabActivityHelper();

            //-----------------------------------------------------------------------------------------------
            // Xamarin.Auth initialization

            // User-Agent tweaks for Embedded WebViews (UIWebView and WKWebView)
            global::Xamarin.Auth.WebViewConfiguration.Android.UserAgent = "moljac++";

            // Xamarin.Auth CustomTabs Initialization/Customisation
            global::Xamarin.Auth.CustomTabsConfiguration.ActionLabel                = null;
            global::Xamarin.Auth.CustomTabsConfiguration.MenuItemTitle              = null;
            global::Xamarin.Auth.CustomTabsConfiguration.AreAnimationsUsed          = true;
            global::Xamarin.Auth.CustomTabsConfiguration.IsShowTitleUsed            = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsUrlBarHidingUsed         = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsCloseButtonIconUsed      = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsActionButtonUsed         = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsActionBarToolbarIconUsed = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsDefaultShareMenuItemUsed = false;

            global::Android.Graphics.Color color_xamarin_blue;
            color_xamarin_blue = new global::Android.Graphics.Color(0x34, 0x98, 0xdb);
            global::Xamarin.Auth.CustomTabsConfiguration.ToolbarColor = color_xamarin_blue;


            // ActivityFlags for tweaking closing of CustomTabs
            // please report findings!
            global::Xamarin.Auth.CustomTabsConfiguration.
            ActivityFlags =
                global::Android.Content.ActivityFlags.NoHistory
                |
                global::Android.Content.ActivityFlags.SingleTop
                |
                global::Android.Content.ActivityFlags.NewTask
            ;

            global::Xamarin.Auth.CustomTabsConfiguration.IsWarmUpUsed   = true;
            global::Xamarin.Auth.CustomTabsConfiguration.IsPrefetchUsed = true;
            //-----------------------------------------------------------------------------------------------
            return;
        }
Exemplo n.º 3
0
        protected void InitializeNativeUICustomTabs()
        {
            // Step 2.2 Customizing the UI - Native UI [OPTIONAL]
            // [Chrome] Custom Tabs WarmUp and prefetch
            custom_tab_activity_helper = new global::Android.Support.CustomTabs.Chromium.SharedUtilities.CustomTabActivityHelper();

            //-----------------------------------------------------------------------------------------------
            // Xamarin.Auth initialization

            // User-Agent tweaks for Embedded WebViews (UIWebView and WKWebView)
            global::Xamarin.Auth.WebViewConfiguration.Android.UserAgent = "moljac++";

            //................................................................
            // Xamarin.Auth CustomTabs Initialization/Customisation
            // Note this API is still under development and subject to changes!

            // CustomTabs closing Toast message (null to turn it of, otherwise define it here)
            global::Xamarin.Auth.CustomTabsConfiguration.CustomTabsClosingMessage = null;
            //global::Xamarin.Auth.CustomTabsConfiguration.CustomTabsClosingMessage = "Closing? Let us know";

            global::Xamarin.Auth.CustomTabsConfiguration.ActionLabel                = null;
            global::Xamarin.Auth.CustomTabsConfiguration.MenuItemTitle              = null;
            global::Xamarin.Auth.CustomTabsConfiguration.AreAnimationsUsed          = true;
            global::Xamarin.Auth.CustomTabsConfiguration.IsShowTitleUsed            = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsUrlBarHidingUsed         = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsCloseButtonIconUsed      = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsActionButtonUsed         = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsActionBarToolbarIconUsed = false;
            global::Xamarin.Auth.CustomTabsConfiguration.IsDefaultShareMenuItemUsed = false;

            global::Android.Graphics.Color color_xamarin_blue;
            color_xamarin_blue = new global::Android.Graphics.Color(0x34, 0x98, 0xdb);
            global::Xamarin.Auth.CustomTabsConfiguration.ToolbarColor = color_xamarin_blue;
            //................................................................


            // ActivityFlags for tweaking closing of CustomTabs
            // please report findings!
            global::Xamarin.Auth.CustomTabsConfiguration.
            ActivityFlags =
                global::Android.Content.ActivityFlags.NoHistory
                |
                global::Android.Content.ActivityFlags.SingleTop
                |
                global::Android.Content.ActivityFlags.NewTask
            ;

            global::Xamarin.Auth.CustomTabsConfiguration.IsWarmUpUsed   = true;
            global::Xamarin.Auth.CustomTabsConfiguration.IsPrefetchUsed = true;
            //-----------------------------------------------------------------------------------------------

            return;
        }
Exemplo n.º 4
0
        //=================================================================

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            //=================================================================
            //  switching between
            //      embbedded browsers (WebView)
            //  and
            //      Native UI ([Chrome] Custom Tabs)
            //  read the docs about pros and cons
            test_native_ui = true;
            //=================================================================

            ListAdapter = new ArrayAdapter <String>(this, global::Android.Resource.Layout.SimpleListItem1, provider_list);

            // [Chrome] Custom Tabs WarmUp and prefetch
            custom_tab_activity_helper = new global::Android.Support.CustomTabs.Chromium.SharedUtilities.CustomTabActivityHelper();


            return;
        }