void ReleaseDesignerOutlets()
        {
            if (AyarlarButton != null)
            {
                AyarlarButton.Dispose();
                AyarlarButton = null;
            }

            if (BoostButton != null)
            {
                BoostButton.Dispose();
                BoostButton = null;
            }

            if (BoostCountLabel != null)
            {
                BoostCountLabel.Dispose();
                BoostCountLabel = null;
            }

            if (BuptisGoldButton != null)
            {
                BuptisGoldButton.Dispose();
                BuptisGoldButton = null;
            }

            if (BuptisGoldToggle != null)
            {
                BuptisGoldToggle.Dispose();
                BuptisGoldToggle = null;
            }

            if (FiltreButton != null)
            {
                FiltreButton.Dispose();
                FiltreButton = null;
            }

            if (FotografEkleButton != null)
            {
                FotografEkleButton.Dispose();
                FotografEkleButton = null;
            }

            if (GeriButton != null)
            {
                GeriButton.Dispose();
                GeriButton = null;
            }

            if (HeaderHazne != null)
            {
                HeaderHazne.Dispose();
                HeaderHazne = null;
            }

            if (KrediButton != null)
            {
                KrediButton.Dispose();
                KrediButton = null;
            }

            if (KrediCountLabel != null)
            {
                KrediCountLabel.Dispose();
                KrediCountLabel = null;
            }

            if (ProfilDuzenleButton != null)
            {
                ProfilDuzenleButton.Dispose();
                ProfilDuzenleButton = null;
            }

            if (SuperBoostButton != null)
            {
                SuperBoostButton.Dispose();
                SuperBoostButton = null;
            }

            if (SuperBoostCountLabel != null)
            {
                SuperBoostCountLabel.Dispose();
                SuperBoostCountLabel = null;
            }

            if (UserAbout != null)
            {
                UserAbout.Dispose();
                UserAbout = null;
            }

            if (UserJob != null)
            {
                UserJob.Dispose();
                UserJob = null;
            }

            if (UserLastLocation != null)
            {
                UserLastLocation.Dispose();
                UserLastLocation = null;
            }

            if (UserLocation != null)
            {
                UserLocation.Dispose();
                UserLocation = null;
            }

            if (UserPhoto != null)
            {
                UserPhoto.Dispose();
                UserPhoto = null;
            }

            if (UserTitle != null)
            {
                UserTitle.Dispose();
                UserTitle = null;
            }
        }
Exemple #2
0
        private void InitComponent(View view)
        {
            try
            {
                ProfileImage     = view.FindViewById <ImageView>(Resource.Id.Iconimage2);
                Username         = view.FindViewById <TextView>(Resource.Id.username);
                WalletNumber     = view.FindViewById <TextView>(Resource.Id.walletnumber);
                TxtUpgrade       = view.FindViewById <TextView>(Resource.Id.upgradeText);
                XtBoostMe        = view.FindViewById <TextView>(Resource.Id.tv_Boost);
                EditButton       = view.FindViewById <CircleButton>(Resource.Id.EditButton);
                SettingsButton   = view.FindViewById <CircleButton>(Resource.Id.SettingsButton);
                BoostButton      = view.FindViewById <CircleButton>(Resource.Id.BoostButton);
                WalletButton     = view.FindViewById <RelativeLayout>(Resource.Id.walletSection);
                PopularityButton = view.FindViewById <RelativeLayout>(Resource.Id.popularitySection);
                UpgradeButton    = view.FindViewById <RelativeLayout>(Resource.Id.upgradeSection);
                FriendsButton    = view.FindViewById <RelativeLayout>(Resource.Id.StFriendsLayout);
                FavoriteButton   = view.FindViewById <RelativeLayout>(Resource.Id.StFavoriteLayout);
                InviteButton     = view.FindViewById <RelativeLayout>(Resource.Id.StInviteFriendsLayout);
                BlogsButton      = view.FindViewById <RelativeLayout>(Resource.Id.StBlogsLayout);
                HelpButton       = view.FindViewById <RelativeLayout>(Resource.Id.StNeedHelpLayout);
                HeaderSection    = view.FindViewById <LinearLayout>(Resource.Id.headerSection);

                MWaveLoadingView            = (WaveLoadingView)view.FindViewById(Resource.Id.waveLoadingView);
                MWaveLoadingView.Visibility = ViewStates.Gone;

                BoostButton.Tag = "Off";

                GlideImageLoader.LoadImage(Activity, UserDetails.Avatar, ProfileImage, ImageStyle.CircleCrop, ImagePlaceholders.Drawable);

                if (AppSettings.SetTabDarkTheme)
                {
                    SettingsButton.SetColor(Color.Black);
                    EditButton.SetColor(Color.Black);
                    BoostButton.SetColor(Color.Black);
                }

                if (AppSettings.EnableAppFree)
                {
                    WalletButton.Visibility  = ViewStates.Invisible;
                    UpgradeButton.Visibility = ViewStates.Invisible;
                }

                if (!AppSettings.PremiumSystemEnabled)
                {
                    Activity.RunOnUiThread(() =>
                    {
                        UpgradeButton.Visibility = ViewStates.Invisible;
                        UpgradeButton.Enabled    = false;
                    });
                }

                if (Build.VERSION.SdkInt < BuildVersionCodes.Lollipop)
                {
                    return;
                }

                Activity.Window.ClearFlags(WindowManagerFlags.TranslucentStatus);
                Activity.Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
                Activity.Window.SetStatusBarColor(Color.ParseColor(AppSettings.MainColor));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }