Exemplo n.º 1
0
        public void OnClick(View view)
        {
            var token = PersistenceProvider.GetToken();

            var radioButtonId = LanguagesRadioGroup.CheckedRadioButtonId;

            var radioButton  = LanguagesRadioGroup.FindViewById <RadioButton>(radioButtonId);
            var iso3Language = (string)radioButton.Tag;

            PersistenceProvider.SetLanguage(iso3Language);
            Activity.SetLanguage(iso3Language);

            Activity.StartActivity(Activity.Intent);
            Activity.Finish();
        }
Exemplo n.º 2
0
        public override void OnBindElements(View view)
        {
            SaveLanguageButton  = view.FindViewById <Button>(Resource.Id.SaveButton);
            LanguagesRadioGroup = view.FindViewById <RadioGroup>(Resource.Id.LanguagesRadioGroup);

            SaveLanguageButton.SetOnClickListener(this);

            var locale = Context.Resources.Configuration.Locale;

            var radioButtonId = Constants.LanguageResourceMap[locale.ISO3Language];

            var radioButton = LanguagesRadioGroup.FindViewById <RadioButton>(radioButtonId);

            radioButton.Checked = true;
        }