protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);

                var onBoarderCard1 = new AhoyOnboarderCard(GetString(Resource.String.Lbl_Title_page1), GetString(Resource.String.Lbl_Description_page1), Resource.Drawable.Onboarding_icon1)
                {
                    BackgroundColor = Resource.Color.accent_transparent
                };

                var onBoarderCard2 = new AhoyOnboarderCard(GetString(Resource.String.Lbl_Title_page2), GetString(Resource.String.Lbl_Description_page2), Resource.Drawable.Onboarding_icon2)
                {
                    BackgroundColor = Resource.Color.accent_transparent
                };

                var onBoarderCard3 = new AhoyOnboarderCard(GetString(Resource.String.Lbl_Title_page3), GetString(Resource.String.Lbl_Description_page3), Resource.Drawable.Onboarding_icon3)
                {
                    BackgroundColor = Resource.Color.accent_transparent
                };

                onBoarderCard1.TitleColor = Resource.Color.white;
                onBoarderCard2.TitleColor = Resource.Color.white;
                onBoarderCard3.TitleColor = Resource.Color.white;

                onBoarderCard1.DescriptionColor = Resource.Color.white;
                onBoarderCard2.DescriptionColor = Resource.Color.white;
                onBoarderCard3.DescriptionColor = Resource.Color.white;

                SetGradientBackground();

                SetFinishButtonTitle(GetString(Resource.String.Lbl_FinishButton_WalkTroutPage));

                var pages = new List <AhoyOnboarderCard>
                {
                    onBoarderCard1, onBoarderCard2, onBoarderCard3
                };

                SetOnboardPages(pages);

                PollyController.RunRetryPolicyFunction(new List <Func <Task> > {
                    ApiRequest.GetGenres_Api
                });

                if (AppSettings.ShowPrice)
                {
                    PollyController.RunRetryPolicyFunction(new List <Func <Task> > {
                        ApiRequest.GetPrices_Api
                    });
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
示例#2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);

                var onBoarderCard1 = new AhoyOnboarderCard(GetString(Resource.String.Lbl_Title_page1), GetString(Resource.String.Lbl_Description_page1), Resource.Drawable.Onboarding_icon1)
                {
                    BackgroundColor = Resource.Color.accent_transparent
                };

                var onBoarderCard2 = new AhoyOnboarderCard(GetString(Resource.String.Lbl_Title_page2), GetString(Resource.String.Lbl_Description_page2), Resource.Drawable.Onboarding_icon2)
                {
                    BackgroundColor = Resource.Color.accent_transparent
                };

                var onBoarderCard3 = new AhoyOnboarderCard(GetString(Resource.String.Lbl_Title_page3), GetString(Resource.String.Lbl_Description_page3), Resource.Drawable.Onboarding_icon3)
                {
                    BackgroundColor = Resource.Color.accent_transparent
                };

                onBoarderCard1.TitleColor = Resource.Color.textIcon;
                onBoarderCard2.TitleColor = Resource.Color.textIcon;
                onBoarderCard3.TitleColor = Resource.Color.textIcon;

                onBoarderCard1.DescriptionColor = Resource.Color.textIcon;
                onBoarderCard2.DescriptionColor = Resource.Color.textIcon;
                onBoarderCard3.DescriptionColor = Resource.Color.textIcon;

                SetGradientBackground();

                SetFinishButtonTitle(GetString(Resource.String.Lbl_FinishButton_WalkTroutPage));

                var pages = new List <AhoyOnboarderCard>
                {
                    onBoarderCard1, onBoarderCard2, onBoarderCard3
                };

                SetOnboardPages(pages);

                if (Methods.CheckConnectivity())
                {
                    PollyController.RunRetryPolicyFunction(new List <Func <Task> > {
                        () => ApiRequest.GetStickers(this), () => ApiRequest.GetGifts(this)
                    });
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }