Example #1
0
 private void ClearBothRG()
 {
     rgShooting1.ClearCheck();
     rgShooting2.ClearCheck();
     rbChecked       = 0;
     txtVResult.Text = Calculate(etxtDiff.Text, etxtRoll.Text);
 }
 private void Radio_Expense_Date_Click(object sender, EventArgs e)
 {
     AppDataHelper.editor.PutString("OrderBySelected", "DateDay");
     AppDataHelper.editor.Apply();
     radiogrp.ClearCheck();
     radio_Expense_Date.Checked    = true;
     radio_Submission_Date.Checked = false;
 }
        private void weighClassesOnClick(object sender, AdapterView.ItemSelectedEventArgs e)
        {
            currentMatch = matchList[e.Position];
            myTeamGroup.ClearCheck();
            oppGroup.ClearCheck();
            switch (currentMatch.GetMatchResult())
            {
            case (0):
                break;

            case 1:
                MTF.Checked = true;
                break;

            case 2:
                MTTF.Checked = true;
                break;

            case 3:
                MTMD.Checked = true;
                break;

            case 4:
                MTD.Checked = true;
                break;

            case 5:
                OF.Checked = true;
                break;

            case 6:
                OTF.Checked = true;
                break;

            case 7:
                OMD.Checked = true;
                break;

            case 8:

                OD.Checked = true;
                break;
            }
            whoShowFirst();
        }
        public override void OnStart()
        {
            try
            {
                base.OnStart();
                Helper.HideKeyBoard.hideSoftInput(this.Activity);
                rgPushNotification = rootView.FindViewById <RadioGroup>(Resource.Id.rgNotification);
                rbEnable           = rootView.FindViewById <RadioButton>(Resource.Id.rbEnable);
                rbDisabled         = rootView.FindViewById <RadioButton>(Resource.Id.rbDisabled);
                rgPushNotification.ClearCheck();

                rgPrivacy = rootView.FindViewById <RadioGroup>(Resource.Id.rgPrivacy);
                rbPublic  = rootView.FindViewById <RadioButton>(Resource.Id.rbPublic);
                rbPrivate = rootView.FindViewById <RadioButton>(Resource.Id.rbPrivate);
                rgPrivacy.ClearCheck();

                var    prefs = Application.Context.GetSharedPreferences("WeClip", FileCreationMode.Private);
                string strIsNotificationEnable = prefs.GetString("IsNotificationEnable", "");
                isPublic = prefs.GetBoolean("IsPublic", false);

                bool isNotification;

                bool.TryParse(strIsNotificationEnable, out isNotification);


                if (isNotification == true)
                {
                    rbEnable.Checked = true;
                }
                else
                {
                    rbDisabled.Checked = true;
                }

                if (isPublic == true)
                {
                    rbPublic.Checked = true;
                }
                else
                {
                    rbPrivate.Checked = true;
                }

                btnSave        = rootView.FindViewById <ImageButton>(Resource.Id.btnSaveSetting);
                btnSave.Click += BtnSave_Click;
                int selectedId = rgPushNotification.CheckedRadioButtonId;
                radioButton = rootView.FindViewById <RadioButton>(selectedId);

                int selectedId2 = rgPrivacy.CheckedRadioButtonId;
                radioButtonPrivacy = rootView.FindViewById <RadioButton>(selectedId2);
            }
            catch (System.Exception ex)
            {
                new CrashReportAsync("SettingFragment", "OnStart", ex.Message + ex.StackTrace).Execute();
            }
        }
Example #5
0
 private void OnRg1Change(object sender, RadioGroup.CheckedChangeEventArgs e)
 {
     if (e.CheckedId == -1)
     {
         return;
     }
     _rg2.CheckedChange -= OnRg2Change;
     _rg2.ClearCheck();
     _rg2.CheckedChange += OnRg2Change;
 }
Example #6
0
 private void defaultValue()
 {
     //then clear its value
     TVName.Text            = "";
     TVHeigh.Text           = "";
     TVWeight.Text          = "";
     TVBMI.Text             = "";
     TVBMR.Text             = "";
     TVAge.Text             = "";
     weightStdtextview.Text = "";
     User_gender.ClearCheck();
 }
Example #7
0
        private void InitQuestionForCurrentQuestionIndex()
        {
            var currentQuestion = questions[questionNumber];

            questionHeaderTextView.Text = $"Question {DisplayedQuestionNumber}/{questions.Count}";
            questionTextView.Text       = currentQuestion.Question;

            answerARadioButton.Text = currentQuestion.AnswerA;
            answerBRadioButton.Text = currentQuestion.AnswerB;
            answerCRadioButton.Text = currentQuestion.AnswerC;
            answerDRadioButton.Text = currentQuestion.AnswerD;
            answerRadioGroup.ClearCheck();
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_settings);
            this.Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
            this.Window.ClearFlags(WindowManagerFlags.TranslucentStatus);
            this.Window.SetStatusBarColor(Android.Graphics.Color.ParseColor("#204060"));

            var toolbar = FindViewById <Toolbar>(Resource.Id.tbsettings);

            SetSupportActionBar(toolbar);

            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetDisplayShowHomeEnabled(true);
            toolbar.NavigationIcon.SetColorFilter(Android.Graphics.Color.ParseColor("#04040C"), PorterDuff.Mode.SrcAtop);
            toolbar.SetNavigationOnClickListener(this);

            currencyspinner = FindViewById <Spinner>(Resource.Id.currencyspinner);
            currencyspinner.ItemSelected -= Currencyspinner_ItemSelected;
            currencyspinner.ItemSelected += Currencyspinner_ItemSelected;

            appintro                     = FindViewById <LinearLayout>(Resource.Id.appintro);
            appintro.Click              += Appintro_Click;
            privacy                      = FindViewById <LinearLayout>(Resource.Id.privacy);
            privacy.Click               += Privacy_Click;
            radio_Submission_Date        = FindViewById <RadioButton>(Resource.Id.radio_Submission_Date);
            radio_Expense_Date           = FindViewById <RadioButton>(Resource.Id.radio_Expense_Date);
            radio_Submission_Date.Click += Radio_Submission_Date_Click;
            radio_Expense_Date.Click    += Radio_Expense_Date_Click;
            radiogrp                     = FindViewById <RadioGroup>(Resource.Id.radiogrp);
            database                     = AppDataHelper.GetDatabase();

            FetchCurrencySymbolsTable();
            prefs = PreferenceManager.GetDefaultSharedPreferences(this);
            var mString = prefs.GetString("OrderBySelected", "");

            radiogrp.ClearCheck();
            if (mString == "DateDay")
            {
                radio_Expense_Date.Checked    = true;
                radio_Submission_Date.Checked = false;
            }
            else
            {
                radio_Expense_Date.Checked    = false;
                radio_Submission_Date.Checked = true;
            }
        }
Example #9
0
        private void AddChoices()
        {
            TestChoices = JSONHelper.ChoicesList.FindAll(x => (x.QuestionId.Equals(QuestionID)));

            RadioGroup radioGroupChoices = FindViewById <RadioGroup>(Resource.Id.radioGroup1);

            radioGroupChoices.ClearCheck();
            radioGroupChoices.RemoveAllViews();

            foreach (var choice in TestChoices)
            {
                RadioButton choiceButton = new RadioButton(this);
                choiceButton.Text = choice.Body;
                choiceButton.Id   = choice.Id;
                radioGroupChoices.AddView(choiceButton);
            }
        }
Example #10
0
 private void NextQuestion()
 {//If the user has not yet completed the quiz show the next answer
     if (questionCount < questionstoask)
     {
         radioAnswerGroup.ClearCheck();
         questionCount++;
         Question = ChosenList[questionCount - 1];
         RandomiseButtons(Question);
         txtQuestion.Text      = Question.Question;
         lblQuestionCount.Text = $"Question: {questionCount}/{questionstoask}";
         lblScore.Text         = $"Score: {correctCount}";
     }//Otherwise call function end quiz
     else
     {
         FinishQuiz();
     }
 }
Example #11
0
 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate(bundle);
     // Set our view from the "main" layout resource
     SetContentView(Resource.Layout.Main);
     _rg1 = FindViewById <RadioGroup>(Resource.Id.Radio1);
     _rg2 = FindViewById <RadioGroup>(Resource.Id.Radio2);
     _rg1.ClearCheck();
     _rg2.ClearCheck();
     _rg1.CheckedChange += OnRg1Change;
     _rg2.CheckedChange += OnRg2Change;
     _btn        = FindViewById <Button>(Resource.Id.MyButton);
     _btn.Click += (sender, args) =>
     {
         var check1    = _rg1.CheckedRadioButtonId;
         var check2    = _rg2.CheckedRadioButtonId;
         var realCheck = check1 == -1
                 ? check2
                 : check1;
         Toast.MakeText(this, realCheck.ToString(), ToastLength.Long).Show();
     };
 }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.intent_wedge_sample);

            //create our stop and start buttons which will be used to initiate an intent driven barcode scan
            startBtn        = (Button)FindViewById(Resource.Id.startBtn);
            startBtn.Click += StartButtonClicked;
            stopBtn         = (Button)FindViewById(Resource.Id.stoptBtn);
            stopBtn.Click  += StopButtonClicked;

            // Create a BarcodeManager. It will be used later to change intent delivery modes.
            manager = new BarcodeManager();

            //get the radio group from the displayed layout
            radioGroup = (RadioGroup)FindViewById(Resource.Id.radioGroup);
            // Associate a specific listener.
            radioGroup.CheckedChange += MyClickedItemListener;
            // Clear check and force a default radio button checked.
            radioGroup.ClearCheck();
            radioGroup.Check(Resource.Id.radioStartActivity);
        }
Example #13
0
        int novaPergunta(List <Ceuense> listaCeuenses)
        {
            //Tools da página
            ImageView   foto         = FindViewById <ImageView>(Resource.Id.foto);
            RadioGroup  opcoes       = FindViewById <RadioGroup>(Resource.Id.opcoes);
            RadioButton radioButton1 = FindViewById <RadioButton>(Resource.Id.radioButton1);
            RadioButton radioButton2 = FindViewById <RadioButton>(Resource.Id.radioButton2);
            RadioButton radioButton3 = FindViewById <RadioButton>(Resource.Id.radioButton3);
            TextView    pontuacao    = FindViewById <TextView>(Resource.Id.pontuacao);

            //Pegando a lista de ceuenses
            //Ceuense instanciaDeClasse = new Ceuense();
            //List<Ceuense> listaMorador = instanciaDeClasse.gerarLista();

            //Gerando Indice aleatório
            Random rng             = new Random();
            int    indiceAleatorio = rng.Next(listaCeuenses.Count);

            //Pegando a imagem do ceuense
            string nomeImg    = "morador" + listaCeuenses[indiceAleatorio].id.ToString();
            var    resourceId = (int)typeof(Resource.Drawable).GetField(nomeImg).GetValue(null);

            //Usar o SetImageResource gera bug após trocar muitas vezes de imagem.
            foto.SetImageResource(resourceId);

            //Tornando os radiobuttons preto de novo
            radioButton1.SetTextColor(Color.Black);
            radioButton2.SetTextColor(Color.Black);
            radioButton3.SetTextColor(Color.Black);

            //Removendo a seleção do radiobutton
            opcoes.ClearCheck();

            char sexoDoAleatorio = listaCeuenses[indiceAleatorio].sexo;

            //Gerando uma nova lista somente com ceuenses do mesmo sexo e que não sejam o anterior
            List <Ceuense> listaCeuensesFiltrada = listaCeuenses.Where(c => c.sexo == sexoDoAleatorio && c.id != listaCeuenses[indiceAleatorio].id).ToList();

            //Pode gerar um número de 0 à listaMoradorFiltrada.Count
            int indiceAleatorioListaFiltrada  = rng.Next(listaCeuensesFiltrada.Count);
            int indiceAleatorioListaFiltrada2 = rng.Next(listaCeuensesFiltrada.Count);

            //Caso o valor já tenha sido sorteado, sorteie outro
            while (indiceAleatorioListaFiltrada == indiceAleatorioListaFiltrada2)
            {
                indiceAleatorioListaFiltrada = rng.Next(listaCeuensesFiltrada.Count);
            }

            //Sorteando onde a respota correta ficará
            int opcaoCorreta = rng.Next(1, 4);

            switch (opcaoCorreta)
            {
            case 1:
                radioButton1.Text = listaCeuenses[indiceAleatorio].nome;
                radioButton2.Text = listaCeuensesFiltrada[indiceAleatorioListaFiltrada].nome;
                radioButton3.Text = listaCeuensesFiltrada[indiceAleatorioListaFiltrada2].nome;
                break;

            case 2:
                radioButton1.Text = listaCeuensesFiltrada[indiceAleatorioListaFiltrada].nome;
                radioButton2.Text = listaCeuenses[indiceAleatorio].nome;
                radioButton3.Text = listaCeuensesFiltrada[indiceAleatorioListaFiltrada2].nome;
                break;

            case 3:
                radioButton1.Text = listaCeuensesFiltrada[indiceAleatorioListaFiltrada].nome;
                radioButton2.Text = listaCeuensesFiltrada[indiceAleatorioListaFiltrada2].nome;
                radioButton3.Text = listaCeuenses[indiceAleatorio].nome;
                break;
            }
            return(opcaoCorreta);
        }
        public async Task sendToServer()
        {
            List <GSTINVerFiles1> imageList = new List <GSTINVerFiles1>();

            for (int i = 0; i < Utilities.imageList.Count; i++)
            {
                byte[] img = GetStreamFromFile(Utilities.imageList[i].ImagePath);
                var    url = await ic.UploadPhotoAsync(img, Utilities.imageList[i].ImagePath.Substring(Utilities.imageList[i].ImagePath.LastIndexOf("/") + 1));

                if (url != null)
                {
                    imageList.Add(new GSTINVerFiles1
                    {
                        VerFileName = url,
                        GeoLocation = geo.GetGeoLocation(Activity),
                    });
                }
            }

            GSTINModel model = new GSTINModel();

            model.GeoLocation           = geo.GetGeoLocation(Activity);
            model.GSTINID               = GSTIN;
            model.WentNotVerified       = "";
            model.AppDateTime           = DateTime.Now.ToString("yyyy-MM-dd");
            model.AddressStatus         = address;
            model.BusinessStatus        = businessStatus;
            model.RegistrationAccording = registration;
            model.Other = other;
            model.CompoundingEligible  = compoundingEligible;
            model.PremisesArea         = premisesArea;
            model.GSTINVerFiles        = imageList;
            model.ManufacturerOrTrader = combine;
            model.TurnOver             = turnOver;
            PackageManager manager = Activity.PackageManager;
            PackageInfo    info    = manager.GetPackageInfo(Activity.PackageName, 0);

            model.versionName = info.VersionName.ToString();

            string dt       = JsonConvert.SerializeObject(model);
            string response = "";

            try
            {
                response = await restService.PostServiceMethod(Activity, "SetGSTINCertification", dt);
            }catch (Exception ex)
            {
            }
            if (response.Contains("Success"))
            {
                Toast.MakeText(Activity, "Data Submitted Successfully.", ToastLength.Long).Show();
                GSTIN = "";
                rg1.ClearCheck();
                address = "";
                rg2.ClearCheck();
                businessStatus = "";
                rg3.ClearCheck();
                registration          = "";
                other                 = "";
                otherText.Text        = "";
                checkValidate.Checked = false;
                compoundingEligible   = "";
                premisesArea          = "";
                areaBusiness.Text     = "";
                turnoverText.Text     = "";
                Utilities.imageList.Clear();
                combine  = "";
                turnOver = "";
                submitDataVer.Enabled = true;
                Manufacturer.Checked  = false;
                Trader.Checked        = false;
                ServiceDealer.Checked = false;
                manuf  = "";
                trad   = "";
                dealer = "";
                grid_adapter.NotifyDataSetChanged();
                info.VersionName.ToString();
                Utilities.GlobalBusinessList.Clear();
                try
                {
                    int i = dba.insertGSTINData(geo.GetGeoLocation(Activity), GSTIN, "", DateTime.Now.ToString("yyyy-MM-dd"),
                                                address, businessStatus, registration, other, compoundingEligible, premisesArea,
                                                combine, turnOver, info.VersionName.ToString(), "yes");

                    for (int j = 0; j < imageList.Count; j++)
                    {
                        dba.insertImageDetail(i, imageList[j].VerFileName, geo.GetGeoLocation(Activity));
                    }
                }catch (Exception ex)
                {
                }
            }
            else
            {
                Toast.MakeText(Activity, "Something went wrong. Please try after sometime.", ToastLength.Long).Show();
                submitDataVer.Enabled = true;
                int i = dba.insertGSTINData(geo.GetGeoLocation(Activity), GSTIN, "", DateTime.Now.ToString("yyyy-MM-dd"),
                                            address, businessStatus, registration, other, compoundingEligible, premisesArea,
                                            combine, turnOver, info.VersionName.ToString(), "no");

                for (int j = 0; j < Utilities.imageList.Count; j++)
                {
                    dba.insertImageDetail(i, Utilities.imageList[j].ImagePath, geo.GetGeoLocation(Activity));
                }
            }
        }
Example #15
0
        protected override void OnStart()
        {
            base.OnStart();
            SetContentView(Resource.Layout.ChooseDisplay);

            disalbeEnableAllRadioButtons("enable");

            rgTimePeriod = FindViewById <RadioGroup>(Resource.Id.radioGroupTimePeriod);
            rgTimePeriod.ClearCheck();
            rgTimePeriod.CheckedChange += OnCheckedChange;
            rgDisplayFormat             = FindViewById <RadioGroup>(Resource.Id.radioGroupDisplayFormat);
            rgDisplayFormat.ClearCheck();
            rgDisplayFormat.CheckedChange += OnCheckedChange;

            isTimePeriodSelected    = 0;
            isDisplayFormatSelected = 0;
            timePeriod    = "not chosen";
            displayFormat = "not chosen";


            var inputTime = FindViewById <EditText>(Resource.Id.chooseTime);

            inputTime.Visibility = ViewStates.Gone;
            FindViewById <TextView>(Resource.Id.displayUserTime).Visibility = ViewStates.Gone;
            FindViewById <Button>(Resource.Id.OKButton).Visibility          = ViewStates.Gone;
            var OKButton = FindViewById <Button>(Resource.Id.OKButton);

            OKButton.Visibility = ViewStates.Gone;

            inputTime.TextChanged += (object sender, Android.Text.TextChangedEventArgs e) => {
                //https://msdn.microsoft.com/en-us/library/0xh24xh4.aspx
                string value = e.Text.ToString();
                System.Globalization.NumberStyles style;
                System.Globalization.CultureInfo  culture;
                float number;
                style   = System.Globalization.NumberStyles.Number;
                culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-GB");
                if (Single.TryParse(value, style, culture, out number))
                {
                    Console.WriteLine("Converted '{0}' to {1}.", value, number);
                    string message = "Converted " + value + "to " + number;
                    inputYear = number;
                }

                else
                {
                    Console.WriteLine("Unable to convert '{0}'.", value);
                    string message = "Unable to convert " + value;
                    inputYear = 0;
                }
            };

            OKButton.Click += (sender, e) =>
            {
                if (inputYear > 0)
                {
                    int days = calculateNumberOfDays(inputYear);
                    timePeriod = days.ToString();
                    startWeighHistoryActivity();
                }
                else
                {
                    CreateAndShowDialog("Please insert a decimal number larger than 0", "Input Error");
                }
            };
        }
Example #16
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            //Layouts
            LinearLayout layoutbase = FindViewById <LinearLayout>(Resource.Id.mainLinear);

            layoutbase.SetBackgroundColor(Color.DarkRed);
            RelativeLayout relativebase = new RelativeLayout(this);

            relativebase.SetBackgroundColor(Color.Transparent);

            //Gets the actual phones dimensions
            var met = Resources.DisplayMetrics;

            scrW = met.WidthPixels;
            scrH = met.HeightPixels;

            //New colors
            Color tBlack        = new Color(0, 0, 0, 80);
            Color etxtHintColor = new Color(56, 56, 56);
            Color etxtFontColor = Color.Silver;

            //Color state list
            Android.Content.Res.ColorStateList cslRG = new Android.Content.Res.ColorStateList(
                new int[][] {
                new int[] { -Android.Resource.Attribute.StateEnabled },
                new int[] { Android.Resource.Attribute.StateEnabled }
            },
                new int[] {
                tBlack,
                Color.Silver
            });

            //Item creations
            etxtDiff = new EditText(this)
            {
                InputType = Android.Text.InputTypes.ClassNumber,
                Hint      = GetString(Resource.String.difficulty),
                Gravity   = GravityFlags.Center
            };
            etxtDiff.SetHintTextColor(etxtHintColor);
            etxtDiff.SetTextColor(etxtFontColor);
            etxtRoll = new EditText(this)
            {
                InputType = Android.Text.InputTypes.ClassNumber,
                Hint      = GetString(Resource.String.roll),
                Gravity   = GravityFlags.Center
            };
            etxtRoll.SetHintTextColor(etxtHintColor);
            etxtRoll.SetTextColor(etxtFontColor);
            txtVResult = new TextView(this)
            {
                TextAlignment = TextAlignment.Gravity,
                Gravity       = GravityFlags.Center,
                TextSize      = 20,
                Text          = Calculate(etxtDiff.Text, etxtRoll.Text),
                Id            = Resource.String.idtxtResult
            };
            txtVResult.SetTextColor(Color.Black);
            TextView txtDiff = new TextView(this)
            {
                Id       = 99,
                Gravity  = GravityFlags.Left,
                TextSize = 18,
                Text     = GetString(Resource.String.diff_text)
            };

            txtDiff.SetTextColor(Color.Black);

            ddlDiff = new Spinner(this)
            {
                Id = 98
            };


            //Radio group
            rgShooting1 = new RadioGroup(this)
            {
                Orientation = Orientation.Horizontal
            };
            RadioButton[] rb1 = new RadioButton[3];
            for (int i = 0; i < rb1.Length; i++)
            {
                rb1[i] = new RadioButton(this)
                {
                    Text           = GetString(GetShootingID(i)),
                    Id             = 100 + i,
                    ButtonTintList = cslRG
                };
                rb1[i].SetTextColor(Color.Goldenrod);
                rb1[i].Click += RBRangeDeselect_Click;
                rgShooting1.AddView(rb1[i]);
            }
            rgShooting2 = new RadioGroup(this)
            {
                Orientation = Orientation.Horizontal
            };
            RadioButton[] rb2 = new RadioButton[2];
            for (int i = 0; i < rb2.Length; i++)
            {
                rb2[i] = new RadioButton(this)
                {
                    Text           = GetString(GetShootingID(i + 3)),
                    Id             = 103 + i,
                    ButtonTintList = cslRG
                };
                rb2[i].SetTextColor(Color.Goldenrod);
                rb2[i].Click += RBRangeDeselect_Click;
                rgShooting2.AddView(rb2[i]);
            }
            rgShooting1.ClearCheck();
            rgShooting2.ClearCheck();


            rgShootMode = new RadioGroup(this)
            {
                Orientation = Orientation.Horizontal
            };
            RadioButton[] rbMode = new RadioButton[3];
            for (int i = 0; i < rbMode.Length; i++)
            {
                rbMode[i] = new RadioButton(this)
                {
                    Text           = GetString(GetShotModeId(i)),
                    Id             = 200 + i,
                    Gravity        = GravityFlags.Center,
                    ButtonTintList = cslRG
                };
                rbMode[i].SetTextColor(Color.Goldenrod);
                rgShootMode.AddView(rbMode[i]);
            }
            rgShootMode.ClearCheck();


            //Create layouts
            LinearLayout.LayoutParams llpMW     = new LinearLayout.LayoutParams(LayoutParams.MatchParent, LayoutParams.WrapContent);
            LinearLayout.LayoutParams llpMWBM40 = new LinearLayout.LayoutParams(LayoutParams.MatchParent, LayoutParams.WrapContent)
            {
                BottomMargin = 40
            };
            LinearLayout.LayoutParams llpMWBM80 = new LinearLayout.LayoutParams(LayoutParams.MatchParent, LayoutParams.WrapContent)
            {
                BottomMargin = 80
            };
            LinearLayout.LayoutParams llpTxtDiff = new LinearLayout.LayoutParams(MathCeiling(scrW, 0.4), LayoutParams.WrapContent)
            {
                BottomMargin = 40,
                Gravity      = GravityFlags.Left
            };
            LinearLayout.LayoutParams llpDdlDiff = new LinearLayout.LayoutParams(MathCeiling(scrW, 0.44), LayoutParams.WrapContent)
            {
                BottomMargin = 40,
                Gravity      = GravityFlags.Right
            };
            LinearLayout.LayoutParams llpWWC = new LinearLayout.LayoutParams(LayoutParams.WrapContent, LayoutParams.WrapContent)
            {
                Gravity = GravityFlags.Center
            };
            RelativeLayout.LayoutParams rlpRlo     = new RelativeLayout.LayoutParams(scrW, scrH);
            RelativeLayout.LayoutParams rlpTxtDiff = new RelativeLayout.LayoutParams(MathCeiling(scrW, 0.4), LayoutParams.WrapContent)
            {
                LeftMargin   = MathCeiling(scrW, 0.1),
                TopMargin    = 20,
                BottomMargin = 40
            };
            rlpTxtDiff.AddRule(LayoutRules.AlignParentLeft);
            RelativeLayout.LayoutParams rlpDdlDiff = new RelativeLayout.LayoutParams(MathCeiling(scrW, 0.44), LayoutParams.WrapContent)
            {
                TopMargin    = 20,
                BottomMargin = 40
            };
            rlpDdlDiff.AddRule(LayoutRules.AlignParentRight);

            //Add layouts
            etxtDiff.LayoutParameters    = llpMW;
            ddlDiff.LayoutParameters     = rlpDdlDiff;
            txtDiff.LayoutParameters     = rlpTxtDiff;
            etxtRoll.LayoutParameters    = llpMWBM40;
            txtVResult.LayoutParameters  = llpMWBM80;
            rgShooting1.LayoutParameters = llpMW;
            rgShooting2.LayoutParameters = llpWWC;
            rgShootMode.LayoutParameters = llpMW;

            //Drop down items
            var diffArrays = ArrayAdapter.CreateFromResource(this, Resource.Array.difficulty_array, Resource.Layout.spinner_item);

            diffArrays.SetDropDownViewResource(Resource.Layout.spinner_dd_items);
            ddlDiff.Adapter = diffArrays;
            ddlDiff.SetSelection(diffArrays.GetPosition("Challenging +0"));


            //Add methods
            etxtDiff.TextChanged      += ResultChanger;
            etxtRoll.TextChanged      += ResultChanger;
            ddlDiff.ItemSelected      += DdlDiff_ItemSelected;
            rgShooting1.CheckedChange += RgShooting1_CheckedChange;
            rgShooting2.CheckedChange += RgShooting2_CheckedChange;
            rgShootMode.CheckedChange += RgShootMode_CheckedChange;

            //Order of insertion
            layoutbase.AddView(etxtDiff);
            layoutbase.AddView(etxtRoll);
            layoutbase.AddView(txtVResult);
            layoutbase.AddView(AddLine(8000));
            relativebase.AddView(txtDiff);
            relativebase.AddView(ddlDiff);
            layoutbase.AddView(relativebase);
            //layoutbase.AddView(txtDiff);
            //layoutbase.AddView(ddlDiff);
            layoutbase.AddView(AddLine(8001));
            layoutbase.AddView(rgShooting1);
            layoutbase.AddView(rgShooting2);
            layoutbase.AddView(AddLine(8002));
            layoutbase.AddView(rgShootMode);

            //Layout
            layoutbase.Click += MainActivity_Click;
            imm = (InputMethodManager)GetSystemService(InputMethodService);
        }
 public void BeforeTextChanged(ICharSequence s, int start, int count, int after)
 {
     mRadioGroupAspectRatio.ClearCheck();
 }
Example #18
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);
                SetContentView(Resource.Layout.CreateEvent);
                Toolbar toolbar = (Toolbar)FindViewById(Resource.Id.toolbar);
                SetSupportActionBar(toolbar);
                TextView toolbar_title = (TextView)this.FindViewById(Resource.Id.toolbar_title);
                SupportActionBar.Title = "";
                if (Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Lollipop)
                {
                    Window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);
                    Window.SetStatusBarColor(new Android.Graphics.Color(Android.Support.V4.Content.ContextCompat.GetColor(this, Resource.Color.primaryDark)));
                }
                eventTitle    = FindViewById <EditText>(Resource.Id.etEventTitle);
                eventDate     = FindViewById <TextView>(Resource.Id.etEventDate);
                eventTime     = FindViewById <TextView>(Resource.Id.etEventTime);
                eventLocation = FindViewById <EditText>(Resource.Id.etEventLocation);
                EventInfo     = FindViewById <EditText>(Resource.Id.etEventInfo);
                //   coHost = FindViewById<EditText>(Resource.Id.etEventHost);
                rgPrivacy                = FindViewById <RadioGroup>(Resource.Id.rgPrivacy);
                rbPublic                 = FindViewById <RadioButton>(Resource.Id.rbPublic);
                rbPrivate                = FindViewById <RadioButton>(Resource.Id.rbPrivate);
                imgCreateEvent           = FindViewById <ImageButton>(Resource.Id.imgCreateEvent);
                ivCreateEventBack        = FindViewById <ImageButton>(Resource.Id.ivCreateEventBack);
                imgCreateEvent.Click    += ImgCreateEvent_Click;
                ivCreateEventBack.Click += IvCreateEventBack_Click;
                rgPrivacy.ClearCheck();
                rgPrivacy.SetOnCheckedChangeListener(new rbgCheckedChangeListner(this, rbPublic, rbPrivate));

                eventDate.Click += EventDate_Click;
                eventTime.Click += EventTime_Click;

                updateData      = this.Intent.GetStringExtra("strEditEvent") ?? null;
                strFromAddEvent = this.Intent.GetStringExtra("strAddEventPic") ?? null;

                if (strFromAddEvent != null)
                {
                    model = JsonConvert.DeserializeObject <EventModel>(strFromAddEvent);
                    FillEventDetails(model);
                }
                else
                {
                    if (updateData != null)
                    {
                        model = JsonConvert.DeserializeObject <EventModel>(updateData);
                        FillEventDetails(model);
                    }
                    else
                    {
                        model            = new EventModel();
                        rbPublic.Checked = true;
                    }
                }

                if (model.EventID != 0)
                {
                    toolbar_title.Text = "Edit Event";
                }
                else
                {
                    toolbar_title.Text = "Create Event";
                }
            }
            catch (Exception ex)
            {
                new CrashReportAsync("CreateEvent", "OnCreate", ex.Message + ex.StackTrace).Execute();
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            rootView = inflater.Inflate(Resource.Layout.gstn_verification, container, false);

            StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
            StrictMode.SetVmPolicy(builder.Build());
            StrictMode.ThreadPolicy.Builder builder1 = new StrictMode.ThreadPolicy.Builder().PermitAll();
            StrictMode.SetThreadPolicy(builder1.Build());


            con = new InternetConnection();

            searchGST            = (TextInputEditText)rootView.FindViewById(Resource.Id.searchGSTN);
            gstnProgress         = (ProgressBar)rootView.FindViewById(Resource.Id.progressGST);
            tradeName1           = (TextView)rootView.FindViewById(Resource.Id.tradeName);
            gstnIdText1          = (TextView)rootView.FindViewById(Resource.Id.gstnId);
            regDate1             = (TextView)rootView.FindViewById(Resource.Id.regDate);
            mobileNumber1        = (TextView)rootView.FindViewById(Resource.Id.mobileNumberVer);
            linear1              = (LinearLayout)rootView.FindViewById(Resource.Id.linearQuestion1);
            linear2              = (LinearLayout)rootView.FindViewById(Resource.Id.linearQuestion2);
            linear3              = (LinearLayout)rootView.FindViewById(Resource.Id.linearQuestion3);
            gridLayout           = (LinearLayout)rootView.FindViewById(Resource.Id.gridVer);
            submitDataVer        = (Button)rootView.FindViewById(Resource.Id.submitVerification);
            cameraVer            = (ImageButton)rootView.FindViewById(Resource.Id.cameraVer);
            gridViewVer          = (GridView)rootView.FindViewById(Resource.Id.gridViewVer);
            checkValidate        = (CheckBox)rootView.FindViewById(Resource.Id.checkVerification);
            rg1                  = (RadioGroup)rootView.FindViewById(Resource.Id.myRadioGroup1);
            rg2                  = (RadioGroup)rootView.FindViewById(Resource.Id.myRadioGroup2);
            rg3                  = (RadioGroup)rootView.FindViewById(Resource.Id.myRadioGroup3);
            rg4                  = (LinearLayout)rootView.FindViewById(Resource.Id.myRadioGroup4);
            Yes1                 = (RadioButton)rootView.FindViewById(Resource.Id.yes1);
            Yes2                 = (RadioButton)rootView.FindViewById(Resource.Id.yes2);
            Yes3                 = (RadioButton)rootView.FindViewById(Resource.Id.yes3);
            No1                  = (RadioButton)rootView.FindViewById(Resource.Id.no1);
            No2                  = (RadioButton)rootView.FindViewById(Resource.Id.no2);
            No3                  = (RadioButton)rootView.FindViewById(Resource.Id.no3);
            Manufacturer         = (CheckBox)rootView.FindViewById(Resource.Id.manufacturer);
            Trader               = (CheckBox)rootView.FindViewById(Resource.Id.trader);
            ServiceDealer        = (CheckBox)rootView.FindViewById(Resource.Id.serviceDealer);
            turnoverText         = (TextInputEditText)rootView.FindViewById(Resource.Id.turnOver);
            otherText            = (TextInputEditText)rootView.FindViewById(Resource.Id.otherText1);
            areaBusiness         = (TextInputEditText)rootView.FindViewById(Resource.Id.area1);
            businessSelectButton = (Button)rootView.FindViewById(Resource.Id.mySelection);

            grid_adapter        = new GridAdapter(Activity, Utilities.imageList);
            gridViewVer.Adapter = grid_adapter;

            tradeName1.Visibility  = ViewStates.Gone;
            gstnIdText1.Visibility = ViewStates.Gone;
            regDate1.Visibility    = ViewStates.Gone;

            mobileNumber1.Visibility = ViewStates.Gone;

            gridLayout.Visibility = ViewStates.Gone;

            submitDataVer.Visibility = ViewStates.Gone;

            cameraVer.Visibility     = ViewStates.Gone;
            gridViewVer.Visibility   = ViewStates.Gone;
            checkValidate.Visibility = ViewStates.Gone;

            linear1.Visibility = ViewStates.Gone;
            linear2.Visibility = ViewStates.Gone;
            linear3.Visibility = ViewStates.Gone;

            otherText.Visibility            = ViewStates.Gone;
            areaBusiness.Visibility         = ViewStates.Gone;
            turnoverText.Visibility         = ViewStates.Gone;
            rg4.Visibility                  = ViewStates.Gone;
            businessSelectButton.Visibility = ViewStates.Gone;


            Yes1.Click += RadioButtonClick;
            No1.Click  += RadioButtonClick;
            Yes2.Click += RadioButtonClick;
            No2.Click  += RadioButtonClick;
            Yes3.Click += RadioButtonClick;
            No3.Click  += RadioButtonClick;

            businessSelectButton.Click += delegate
            {
                try
                {
                    Intent i = new Intent(Activity, typeof(BusinessTypeFragment));
                    Activity.StartActivity(i);

                    //FragmentTransaction ft = FragmentManager.BeginTransaction();
                    //BusinessTypeFragment f4 = new BusinessTypeFragment();
                    //ft.Replace(Resource.Id.container, f4);
                    //ft.AddToBackStack("BusinessTypeFragment");
                    //ft.Commit();
                    // FragmentManager.BeginTransaction().Add(Resource.Id.container, new BusinessTypeFragment()).Commit();
                }catch (Exception ex)
                {
                }
            };



            mobileNumber1.Click += delegate
            {
                AlertDialog.Builder alertDiag = new AlertDialog.Builder(Activity);
                alertDiag.SetTitle("Call Dialog");
                alertDiag.SetMessage("Do you want to call?");
                alertDiag.SetPositiveButton("Call", (senderAlert, args) => {
                    try
                    {
                        var uri    = Android.Net.Uri.Parse("tel:" + phoneNumber);
                        var intent = new Intent(Intent.ActionDial, uri);
                        StartActivity(intent);
                    }catch (Exception e)
                    {
                    }
                });
                alertDiag.SetNegativeButton("Cancel", (senderAlert, args) => {
                    alertDiag.Dispose();
                });
                Android.App.Dialog diag = alertDiag.Create();
                diag.Show();
            };

            cameraVer.Click += delegate
            {
                CameraPic();
            };

            searchGST.TextChanged += delegate
            {
                if (searchGST.Text.ToString().Length >= 15)
                {
                    string searchText = searchGST.Text.ToString();
                    if (con.connectivity())
                    {
                        GSTNSearch(searchText).Wait();
                    }
                    else
                    {
                        Toast.MakeText(Activity, "Please connect to Internet.", ToastLength.Long).Show();
                    }
                }
                else
                {
                    tradeName1.Visibility    = ViewStates.Gone;
                    gstnIdText1.Visibility   = ViewStates.Gone;
                    regDate1.Visibility      = ViewStates.Gone;
                    mobileNumber1.Visibility = ViewStates.Gone;

                    gridLayout.Visibility    = ViewStates.Gone;
                    checkValidate.Visibility = ViewStates.Gone;
                    submitDataVer.Visibility = ViewStates.Gone;

                    cameraVer.Visibility   = ViewStates.Gone;
                    gridViewVer.Visibility = ViewStates.Gone;
                    linear1.Visibility     = ViewStates.Gone;
                    linear2.Visibility     = ViewStates.Gone;
                    linear3.Visibility     = ViewStates.Gone;

                    otherText.Visibility            = ViewStates.Gone;
                    areaBusiness.Visibility         = ViewStates.Gone;
                    turnoverText.Visibility         = ViewStates.Gone;
                    rg4.Visibility                  = ViewStates.Gone;
                    businessSelectButton.Visibility = ViewStates.Gone;
                }
            };

            submitDataVer.Click += delegate {
                other        = otherText.Text.ToString();
                premisesArea = areaBusiness.Text.ToString();
                if (checkValidate.Selected)
                {
                    compoundingEligible = "Yes";
                }
                else
                {
                    compoundingEligible = "No";
                }

                //if (Manufacturer.Selected)
                //{
                //    manuf = "Manufacturer";
                //}
                //if (Trader.Selected)
                //{
                //    trad = "Trader";
                //}
                //if (ServiceDealer.Selected)
                //{
                //    dealer = "Service Dealer";
                //}

                turnOver = turnoverText.Text.ToString();
                //if (!manuf.Equals(""))
                //{
                //    if (!combine.Equals(""))
                //    {
                //        combine += "," + manuf;
                //    }
                //    else
                //    {
                //        combine += manuf;
                //    }
                //}
                //if (!trad.Equals(""))
                //{
                //    if (!combine.Equals(""))
                //    {
                //        combine += "," + trad;
                //    }
                //    else
                //    {
                //        combine += trad;
                //    }
                //}
                //if (!dealer.Equals(""))
                //{
                //    if (!combine.Equals(""))
                //    {
                //        combine += "," + dealer;
                //    }
                //    else
                //    {
                //        combine += dealer;
                //    }
                //}
                try
                {
                    combine = string.Join(",", Utilities.GlobalBusinessList);
                }catch (Exception ex)
                {
                    combine = "";
                }


                if (address.Equals(""))
                {
                    Toast.MakeText(Activity, "Please Select Address Status", ToastLength.Short).Show();
                    return;
                }
                if (businessStatus.Equals(""))
                {
                    Toast.MakeText(Activity, "Please Select Business Status", ToastLength.Short).Show();
                    return;
                }

                if (registration.Equals(""))
                {
                    Toast.MakeText(Activity, "Please Select Registration Status", ToastLength.Short).Show();
                    return;
                }

                if (Utilities.imageList.Count < 1)
                {
                    Toast.MakeText(Activity, "Please Capture Atleast One Photograph.", ToastLength.Short).Show();
                    return;
                }


                if (con.connectivity())
                {
                    submitDataVer.Enabled = false;
                    try
                    {
                        sendToServer();
                    }catch (Exception ex)
                    {
                        Toast.MakeText(Activity, "Something went wrong. Please try after sometime.", ToastLength.Long).Show();

                        PackageManager manager = Activity.PackageManager;
                        PackageInfo    info    = manager.GetPackageInfo(Activity.PackageName, 0);
                        info.VersionName.ToString();
                        int i = dba.insertGSTINData(geo.GetGeoLocation(Activity), GSTIN, "", DateTime.Now.ToString("yyyy-MM-dd"),
                                                    address, businessStatus, registration, other, compoundingEligible, premisesArea,
                                                    combine, turnOver, info.VersionName.ToString(), "no");

                        for (int j = 0; j < Utilities.imageList.Count; j++)
                        {
                            dba.insertImageDetail(i, Utilities.imageList[j].ImagePath, geo.GetGeoLocation(Activity));
                        }
                    }
                }
                else
                {
                    submitDataVer.Enabled = false;
                    PackageManager manager = Activity.PackageManager;
                    PackageInfo    info    = manager.GetPackageInfo(Activity.PackageName, 0);
                    info.VersionName.ToString();
                    int i = dba.insertGSTINData(geo.GetGeoLocation(Activity), GSTIN, "", DateTime.Now.ToString("yyyy-MM-dd"),
                                                address, businessStatus, registration, other, compoundingEligible, premisesArea,
                                                combine, turnOver, info.VersionName.ToString(), "no");

                    for (int j = 0; j < Utilities.imageList.Count; j++)
                    {
                        dba.insertImageDetail(i, Utilities.imageList[j].ImagePath, geo.GetGeoLocation(Activity));
                    }
                    Toast.MakeText(Activity, "Data Saved in Database.", ToastLength.Long).Show();

                    combine = "";
                    GSTIN   = "";
                    rg1.ClearCheck();
                    address = "";
                    rg2.ClearCheck();
                    businessStatus = "";
                    rg3.ClearCheck();
                    registration          = "";
                    other                 = "";
                    otherText.Text        = "";
                    checkValidate.Checked = false;
                    compoundingEligible   = "";
                    premisesArea          = "";
                    areaBusiness.Text     = "";
                    turnoverText.Text     = "";
                    Utilities.imageList.Clear();
                    turnOver              = "";
                    Manufacturer.Checked  = false;
                    Trader.Checked        = false;
                    ServiceDealer.Checked = false;
                    submitDataVer.Enabled = true;
                    manuf  = "";
                    trad   = "";
                    dealer = "";
                    grid_adapter.NotifyDataSetChanged();
                    Utilities.GlobalBusinessList.Clear();
                }
            };

            return(rootView);
        }
Example #20
0
        private void startMain()
        {
            mTabHost.CurrentTab = 0;

            mLlRemoteSurface = (LinearLayout)FindViewById(Resource.Id.llRemoteView);
            mLlLocalSurface  = (LinearLayout)FindViewById(Resource.Id.llLocalView);

            if (null == vieAndroidAPI)
            {
                vieAndroidAPI = new ViEAndroidJavaAPI(this);
            }
            if (0 > setupVoE() || 0 > viEAndroidJavaAPI.VideoEngine || 0 > viEAndroidJavaAPI.Init(enableTrace))
            {
                // Show dialog
                AlertDialog alertDialog = (new AlertDialog.Builder(this)).Create();
                alertDialog.SetTitle("WebRTC Error");
                alertDialog.SetMessage("Can not init video engine.");
                alertDialog.SetButton((int)DialogInterface.ButtonPositive, "OK", new OnClickListenerAnonymousInnerClassHelper(this));
                alertDialog.Show();
            }

            btSwitchCamera = (Button)FindViewById(Resource.Id.btSwitchCamera);
            if (cameraOrientations[0] != -1 && cameraOrientations[1] != -1)
            {
                btSwitchCamera.SetOnClickListener(this);
            }
            else
            {
                btSwitchCamera.Enabled = false;
            }
            btStartStopCall = (Button)FindViewById(Resource.Id.btStartStopCall);
            btStartStopCall.SetOnClickListener(this);
            FindViewById(Resource.Id.btExit).SetOnClickListener(this);

            // cleaning
            remoteSurfaceView = null;
            svLocal           = null;

            // Video codec
            mVideoCodecsStrings = viEAndroidJavaAPI.GetCodecs();
            spCodecType         = (Spinner)FindViewById(Resource.Id.spCodecType);
            spCodecType.OnItemSelectedListener = this;
            spCodecType.Adapter = new SpinnerAdapter(this, this, Resource.Layout.row, mVideoCodecsStrings);
            spCodecType.SetSelection(0);

            // Video Codec size
            spCodecSize = (Spinner)FindViewById(Resource.Id.spCodecSize);
            spCodecSize.OnItemSelectedListener = this;
            spCodecSize.Adapter = new SpinnerAdapter(this, this, Resource.Layout.row, mVideoCodecsSizeStrings);
            spCodecSize.SetSelection(mVideoCodecsSizeStrings.Length - 1);

            // Voice codec
            mVoiceCodecsStrings = viEAndroidJavaAPI.VoE_GetCodecs();
            spVoiceCodecType    = (Spinner)FindViewById(Resource.Id.spVoiceCodecType);
            spVoiceCodecType.OnItemSelectedListener = this;
            spVoiceCodecType.Adapter = new SpinnerAdapter(this, this, Resource.Layout.row, mVoiceCodecsStrings);
            spVoiceCodecType.SetSelection(0);
            // Find ISAC and use it
            for (int i = 0; i < mVoiceCodecsStrings.Length; ++i)
            {
                if (mVoiceCodecsStrings[i].Contains("ISAC"))
                {
                    spVoiceCodecType.SetSelection(i);
                    break;
                }
            }

            RadioGroup radioGroup = (RadioGroup)FindViewById(Resource.Id.radio_group1);

            radioGroup.ClearCheck();
            if (renderType == RenderType.OPENGL)
            {
                radioGroup.Check(Resource.Id.radio_opengl);
            }
            else if (renderType == RenderType.SURFACE)
            {
                radioGroup.Check(Resource.Id.radio_surface);
            }
            else if (renderType == RenderType.MEDIACODEC)
            {
                radioGroup.Check(Resource.Id.radio_mediacodec);
            }

            etRemoteIp      = (EditText)FindViewById(Resource.Id.etRemoteIp);
            etRemoteIp.Text = remoteIp;

            cbLoopback         = (CheckBox)FindViewById(Resource.Id.cbLoopback);
            cbLoopback.Checked = loopbackMode;

            cbStats         = (CheckBox)FindViewById(Resource.Id.cbStats);
            cbStats.Checked = isStatsOn;

            cbVoice         = (CheckBox)FindViewById(Resource.Id.cbVoice);
            cbVoice.Checked = enableVoice;

            cbVideoSend            = (CheckBox)FindViewById(Resource.Id.cbVideoSend);
            cbVideoSend.Checked    = enableVideoSend;
            cbVideoReceive         = (CheckBox)FindViewById(Resource.Id.cbVideoReceive);
            cbVideoReceive.Checked = enableVideoReceive;

            etVTxPort      = (EditText)FindViewById(Resource.Id.etVTxPort);
            etVTxPort.Text = Convert.ToString(destinationPortVideo);

            etVRxPort      = (EditText)FindViewById(Resource.Id.etVRxPort);
            etVRxPort.Text = Convert.ToString(receivePortVideo);

            etATxPort      = (EditText)FindViewById(Resource.Id.etATxPort);
            etATxPort.Text = Convert.ToString(destinationPortVoice);

            etARxPort      = (EditText)FindViewById(Resource.Id.etARxPort);
            etARxPort.Text = Convert.ToString(receivePortVoice);

            cbEnableNack         = (CheckBox)FindViewById(Resource.Id.cbNack);
            cbEnableNack.Checked = enableNack;

            cbEnableSpeaker      = (CheckBox)FindViewById(Resource.Id.cbSpeaker);
            cbEnableAGC          = (CheckBox)FindViewById(Resource.Id.cbAutoGainControl);
            cbEnableAGC.Checked  = enableAGC;
            cbEnableAECM         = (CheckBox)FindViewById(Resource.Id.cbAECM);
            cbEnableAECM.Checked = enableAECM;
            cbEnableNS           = (CheckBox)FindViewById(Resource.Id.cbNoiseSuppression);
            cbEnableNS.Checked   = enableNS;

            cbEnableDebugAPM         = (CheckBox)FindViewById(Resource.Id.cbDebugRecording);
            cbEnableDebugAPM.Checked = false;             // Disable APM debugging by default

            cbEnableVideoRTPDump         = (CheckBox)FindViewById(Resource.Id.cbVideoRTPDump);
            cbEnableVideoRTPDump.Checked = false;             // Disable Video RTP Dump

            cbEnableVoiceRTPDump         = (CheckBox)FindViewById(Resource.Id.cbVoiceRTPDump);
            cbEnableVoiceRTPDump.Checked = false;             // Disable Voice RTP Dump

            etRemoteIp.SetOnClickListener(this);
            cbLoopback.SetOnClickListener(this);
            cbStats.SetOnClickListener(this);
            cbEnableNack.SetOnClickListener(this);
            cbEnableSpeaker.SetOnClickListener(this);
            cbEnableAECM.SetOnClickListener(this);
            cbEnableAGC.SetOnClickListener(this);
            cbEnableNS.SetOnClickListener(this);
            cbEnableDebugAPM.SetOnClickListener(this);
            cbEnableVideoRTPDump.SetOnClickListener(this);
            cbEnableVoiceRTPDump.SetOnClickListener(this);

            if (loopbackMode)
            {
                remoteIp        = LOOPBACK_IP;
                etRemoteIp.Text = remoteIp;
            }
            else
            {
                remoteIp        = LocalIpAddress;
                etRemoteIp.Text = remoteIp;
            }

            // Read settings to refresh each configuration
            readSettings();
        }
Example #21
0
 private void ResetRadioGroup(RadioGroup radioGroup)
 {
     radioGroup.SetOnCheckedChangeListener(null);
     radioGroup.ClearCheck();
     radioGroup.SetOnCheckedChangeListener(this);
 }