public void SetLocalData()
        {
            try
            {
                AgeMin        = UserDetails.AgeMin;
                AgeMax        = UserDetails.AgeMax;
                Gender        = UserDetails.Gender;
                Location      = UserDetails.Location;
                SwitchState   = UserDetails.SwitchState;
                DistanceCount = int.TryParse(UserDetails.Located, out int distance) ? distance : 0;

                AgeSeekBar.SetSelectedMinValue(UserDetails.AgeMin);
                AgeSeekBar.SetSelectedMaxValue(UserDetails.AgeMax);
                DistanceBar.Progress   = DistanceCount;
                OnlineSwitch.Checked   = UserDetails.SwitchState;
                AgeNumberTextView.Text = AgeMin + " - " + AgeMax;

                if (UserDetails.Gender == GlobalConstants.FilterOptionGender)
                {
                    ButtonBoth.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends_pressed);
                    ButtonBoth.SetTextColor(Color.ParseColor("#ffffff"));

                    ButtonGirls.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                    ButtonGirls.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));

                    ButtonMan.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                    ButtonMan.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));
                }
                else if (UserDetails.Gender == GlobalConstants.FilterOptionGenderFemale)
                {
                    ButtonGirls.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends_pressed);
                    ButtonGirls.SetTextColor(Color.ParseColor("#ffffff"));

                    ButtonBoth.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                    ButtonBoth.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));

                    ButtonMan.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                    ButtonMan.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));
                }
                else if (UserDetails.Gender == GlobalConstants.FilterOptionGenderMale)
                {
                    ButtonMan.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends_pressed);
                    ButtonMan.SetTextColor(Color.ParseColor("#ffffff"));

                    ButtonBoth.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                    ButtonBoth.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));

                    ButtonGirls.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                    ButtonGirls.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Ejemplo n.º 2
0
        private void SetLocalData()
        {
            try
            {
                // check current state of a Switch (true or false).
                AgeSeekBar.SetSelectedMinValue(UserDetails.AgeMin);
                AgeSeekBar.SetSelectedMaxValue(UserDetails.AgeMax);

                OnlineSwitch.Checked = UserDetails.SwitchState;

                if (UserDetails.Gender == "4525,4526")
                {
                    ButtonBoth.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends_pressed);
                    ButtonBoth.SetTextColor(Color.ParseColor("#ffffff"));

                    ButtonGirls.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                    ButtonGirls.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));

                    ButtonMan.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                    ButtonMan.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));
                }
                else if (UserDetails.Gender == "4526")
                {
                    ButtonGirls.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends_pressed);
                    ButtonGirls.SetTextColor(Color.ParseColor("#ffffff"));

                    ButtonBoth.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                    ButtonBoth.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));

                    ButtonMan.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                    ButtonMan.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));
                }
                else if (UserDetails.Gender == "4525")
                {
                    ButtonMan.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends_pressed);
                    ButtonMan.SetTextColor(Color.ParseColor("#ffffff"));

                    ButtonBoth.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                    ButtonBoth.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));

                    ButtonGirls.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                    ButtonGirls.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        //Reset Value
        private void ResetTextViewOnClick(object sender, EventArgs e)
        {
            try
            {
                ButtonGirls.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                ButtonGirls.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));

                ButtonBoth.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends_pressed);
                ButtonBoth.SetTextColor(Color.ParseColor("#ffffff"));

                ButtonMan.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                ButtonMan.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));
                Gender = "4525,4526";

                LocationPlace.Text = GetText(Resource.String.Lbl_NearBy);

                AgeMin = 18;
                AgeMax = 75;

                AgeNumberTextView.Text = AgeMin + " - " + AgeMax;

                SwitchState          = false;
                OnlineSwitch.Checked = false;

                Location = ListUtils.MyUserInfo?.FirstOrDefault()?.Country;

                UserDetails.AgeMin      = AgeMin;
                UserDetails.AgeMax      = AgeMax;
                UserDetails.Gender      = Gender;
                UserDetails.Location    = Location;
                UserDetails.SwitchState = SwitchState;

                if ((int)AgeSeekBar.GetSelectedMinValue() != 18)
                {
                    AgeSeekBar.SetSelectedMinValue(18);
                }

                if ((int)AgeSeekBar.GetSelectedMaxValue() != 75)
                {
                    AgeSeekBar.SetSelectedMaxValue(75);
                }

                SetLocationUser();
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
Ejemplo n.º 4
0
        //Select gender >> Girls (1)
        private void ButtonGirlsOnClick(object sender, EventArgs e)
        {
            try
            {
                //follow_button_profile_friends >> Un click
                //follow_button_profile_friends_pressed >> click
                ButtonGirls.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends_pressed);
                ButtonGirls.SetTextColor(Color.ParseColor("#ffffff"));

                ButtonBoth.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                ButtonBoth.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));

                ButtonMan.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                ButtonMan.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));
                Gender = "4526";
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
Ejemplo n.º 5
0
        private void InitComponent(View view)
        {
            try
            {
                MainLayout        = view.FindViewById <RelativeLayout>(Resource.Id.mainLayout);
                IconLocation      = view.FindViewById <TextView>(Resource.Id.IconLocation);
                LocationTextView  = view.FindViewById <TextView>(Resource.Id.LocationTextView);
                LocationPlace     = view.FindViewById <TextView>(Resource.Id.LocationPlace);
                LocationMoreIcon  = view.FindViewById <TextView>(Resource.Id.LocationMoreIcon);
                GenderTextView    = view.FindViewById <TextView>(Resource.Id.GenderTextView);
                IconFire          = view.FindViewById <TextView>(Resource.Id.IconFire);
                IconAge           = view.FindViewById <TextView>(Resource.Id.IconAge);
                AgeTextView       = view.FindViewById <TextView>(Resource.Id.AgeTextView);
                AgeNumberTextView = view.FindViewById <TextView>(Resource.Id.Agenumber);
                OnlineTextView    = view.FindViewById <TextView>(Resource.Id.OnlineTextView);
                IconOnline        = view.FindViewById <TextView>(Resource.Id.Icononline);
                ResetTextView     = view.FindViewById <TextView>(Resource.Id.Resetbutton);
                LocationLayout    = view.FindViewById <RelativeLayout>(Resource.Id.LayoutLocation);
                ButtonMan         = view.FindViewById <Button>(Resource.Id.ManButton);
                ButtonGirls       = view.FindViewById <Button>(Resource.Id.GirlsButton);
                ButtonBoth        = view.FindViewById <Button>(Resource.Id.BothButton);
                ButtonApply       = view.FindViewById <Button>(Resource.Id.ApplyButton);
                AgeSeekBar        = view.FindViewById <RangeSliderControl>(Resource.Id.seekbar);
                OnlineSwitch      = view.FindViewById <Switch>(Resource.Id.togglebutton);
                IconDistance      = view.FindViewById <TextView>(Resource.Id.IconDistance);
                TxtDistanceCount  = view.FindViewById <TextView>(Resource.Id.Distancenumber);
                DistanceBar       = view.FindViewById <SeekBar>(Resource.Id.distanceSeeker);

                ResetTextView.Visibility = ViewStates.Gone;
                ButtonApply.Visibility   = ViewStates.Gone;
                MainLayout.Visibility    = ViewStates.Gone;

                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconLocation, IonIconsFonts.IosLocationOutline);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, LocationMoreIcon, IonIconsFonts.ChevronRight);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconFire, IonIconsFonts.IosPersonOutline);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconAge, IonIconsFonts.Calendar);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconOnline, IonIconsFonts.Ionic);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeLight, IconDistance, FontAwesomeIcon.StreetView);

                FontUtils.SetFont(LocationTextView, Fonts.SfRegular);
                FontUtils.SetFont(LocationPlace, Fonts.SfRegular);
                FontUtils.SetFont(GenderTextView, Fonts.SfRegular);
                FontUtils.SetFont(AgeTextView, Fonts.SfRegular);
                FontUtils.SetFont(OnlineTextView, Fonts.SfRegular);
                FontUtils.SetFont(TxtDistanceCount, Fonts.SfRegular);

                DistanceBar.Max = 50;
                DistanceBar.SetOnSeekBarChangeListener(this);

                AgeSeekBar.SetSelectedMinValue(18);
                AgeSeekBar.SetSelectedMaxValue(75);

                OnlineSwitch.Checked = false;

                ButtonGirls.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                ButtonGirls.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));

                ButtonBoth.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends_pressed);
                ButtonBoth.SetTextColor(Color.ParseColor("#ffffff"));

                ButtonMan.SetBackgroundResource(Resource.Drawable.follow_button_profile_friends);
                ButtonMan.SetTextColor(AppSettings.SetTabDarkTheme ? Color.ParseColor("#ffffff") : Color.ParseColor("#444444"));

                MAdView = view.FindViewById <AdView>(Resource.Id.adView);
                AdsGoogle.InitAdView(MAdView, null);

                SetLocalData();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }