Example #1
0
        void ActivateElement( SpringboardElement activeElement )
        {
            // total hack - If they tap Give, we'll kick them out to the give URL, leaving the app
            // in this state.
            if ( activeElement.Task as GiveTask != null )
            {
                // trigger the Give analytic
                GiveAnalytic.Instance.Trigger( GiveAnalytic.Give );

                TaskWebFragment.HandleUrl( true, true, GiveConfig.GiveUrl, null, null );
            }
            else
            {
                if ( NavbarFragment.ActiveTask != activeElement.Task )
                {
                    ActiveElementIndex = Elements.IndexOf( activeElement ); 

                    foreach ( SpringboardElement element in Elements )
                    {
                        if ( activeElement != element )
                        {
                            element.Deactivate( );
                        }
                    }

                    activeElement.Activate( );
                    NavbarFragment.SetActiveTask( activeElement.Task );
                }
            }
        }
Example #2
0
        void ActivateElement( SpringboardElement activeElement )
        {
            // total hack - If they tap Give, we'll kick them out to the give URL, leaving the app
            // in this state.
            if ( activeElement.Task as GiveTask != null )
            {
                GiveAnalytic.Instance.Trigger( GiveAnalytic.Give );

                var uri = Android.Net.Uri.Parse( GiveConfig.GiveUrl );
                var intent = new Intent( Intent.ActionView, uri );
                ((Activity)Rock.Mobile.PlatformSpecific.Android.Core.Context).StartActivity( intent );
            }
            else
            {
                foreach ( SpringboardElement element in Elements )
                {
                    if ( activeElement != element )
                    {
                        element.Deactivate( );
                    }
                }

                activeElement.Activate( );
                NavbarFragment.SetActiveTask( activeElement.Task );
            }
        }