예제 #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            db       = new DbHelper.DbHelper(this);
            sqLiteDB = db.WritableDatabase;

            seekBar  = FindViewById <SeekBar>(Resource.Id.seekBar);
            txtMode  = FindViewById <TextView>(Resource.Id.txtMode);
            btnPlay  = FindViewById <Button>(Resource.Id.btnPlay);
            btnScore = FindViewById <Button>(Resource.Id.btnScore);

            seekBar.SetOnSeekBarChangeListener(this);
            btnPlay.Click += delegate
            {
                Intent intent = new Intent(this, typeof(Playing));
                intent.PutExtra("MODE", getPlayMode());
                StartActivity(intent);
                Finish();
            };
            btnScore.Click += delegate
            {
                Intent intent = new Intent(this, typeof(Score));
                StartActivity(intent);
                Finish();
            };
        }
예제 #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

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

            subTotalTextView   = FindViewById <TextView>(Resource.Id.lblSubTotal);
            generosityTextView = FindViewById <TextView>(Resource.Id.lblGenerosity);
            tipToLeaveTextView = FindViewById <TextView>(Resource.Id.lblTipToLeave);
            tipTextView        = FindViewById <TextView>(Resource.Id.lblTip);
            generositySeekBar  = FindViewById <SeekBar>(Resource.Id.seekGenerosityProgress);
            subTotalEditText   = FindViewById <EditText>(Resource.Id.txtSubTotal);

            generositySeekBar.SetOnSeekBarChangeListener(new SeekBarChangeListener(this));
            subTotalEditText.AfterTextChanged += (sender, e) =>
            {
                double value = 0;
                try
                {
                    value = Double.Parse(subTotalEditText.Text.ToString());
                }
                catch (Exception)
                {
                    value = 0;
                    throw;
                }
                ViewModel.SubTotal = value;
                tipTextView.Text   = ViewModel.Tip.ToString();
            };
        }
예제 #3
0
        public override void OnStart()
        {
            base.OnStart();

            var videoCallEnabled     = Arguments.GetBoolean(ExtraVideoCallEnabled);
            var captureSliderEnabled = Arguments.GetBoolean(ExtraCaptureSliderEnabled);
            var name = Arguments.GetString(ExtraName);

            _contactView.Text = name;
            if (!videoCallEnabled)
            {
                _cameraSwitchButton.Visibility = ViewStates.Invisible;
            }

            if (captureSliderEnabled)
            {
                _captureFormatSlider.SetOnSeekBarChangeListener(new CaptureQualityController(_captureFormatText,
                                                                                             _callEvents));
            }
            else
            {
                _captureFormatText.Visibility   = ViewStates.Gone;
                _captureFormatSlider.Visibility = ViewStates.Gone;
            }
        }
예제 #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_mainPlayer);
            cover           = FindViewById <RoundedImageView>(Resource.Id.coverTrackMainPlayer);
            position        = FindViewById <TextView>(Resource.Id.positionTrackMainPlayer);
            duration        = FindViewById <TextView>(Resource.Id.durationTrackMainPlayer);
            seekBar         = FindViewById <SeekBar>(Resource.Id.seekbarTrackMainPlayer);
            title           = FindViewById <TextView>(Resource.Id.titleTrackMainPlayer);
            artist          = FindViewById <TextView>(Resource.Id.artistTrackMainPlayer);
            backButton      = FindViewById <Button>(Resource.Id.backButtonTrackMainPlayer);
            playPauseButton = FindViewById <Button>(Resource.Id.playPauseButtonTrackMainPlayer);
            nextButton      = FindViewById <Button>(Resource.Id.nextButtonTrackMainPlayer);
            closeButton     = FindViewById <Button>(Resource.Id.closeButtonMainPlayer);

            player = PlayerService.Instanse;
            player.MainService.PositionChanged     += MainServiceOnPositionChanged;
            player.MainService.CurrentAudioChanged += MainServiceOnCurrentAudioChanged;
            player.MainService.ItemFailed          += MainServiceOnItemFailed;
            backButton.Click      += BackButtonOnClick;
            closeButton.Click     += CloseButtonOnClick;
            playPauseButton.Click += PlayPauseButtonOnClick;
            nextButton.Click      += NextButtonOnClick;
            seekBar.SetOnSeekBarChangeListener(this);
            UpdateDataPlayer();
        }
예제 #5
0
        protected void RegisterEvents()
        {
            ImageButton btnPlus = (ImageButton)this.FindViewById(Resource.Id.deviceDIM_btn_plus);

            if (btnPlus != null)
            {
                btnPlus.Click += new EventHandler(btnPlus_Click);
            }

            ImageButton btnMinus = (ImageButton)this.FindViewById(Resource.Id.deviceDIM_btn_minus);

            if (btnMinus != null)
            {
                btnMinus.Click += new EventHandler(btnMinus_Click);
            }

            SeekBar seekBar = (SeekBar)this.FindViewById(Resource.Id.deviceDIM_seekBar);

            if (seekBar != null)
            {
                var listener = new CustomSeekBarChangeListener();
                listener.StopTrackingTouch += new EventHandler(listener_StopTrackingTouch);
                seekBar.SetOnSeekBarChangeListener(listener);
            }

            ImageButton btnAction = (ImageButton)this.FindViewById(Resource.Id.deviceDim_btnAction);

            if (btnAction != null)
            {
                btnAction.Click += new EventHandler(btnAction_Click);
            }
        }
예제 #6
0
        public Dialog FontSizeDialog(Activity activity)
        {
            ContextThemeWrapper context = new ContextThemeWrapper(activity, App.FUNCTIONS.GetDialogTheme());

            AlertDialog.Builder dialog = new AlertDialog.Builder(context);

            SeekBar seek = new SeekBar(activity);

            seek.Max      = 10;
            seek.Progress = App.STATE.SeekBarTextSize;
            seek.SetOnSeekBarChangeListener(new SeekBarListener(this));

            int size = App.FUNCTIONS.GetWebViewTextSize(App.STATE.SeekBarTextSize);

            dialog.SetIcon(Resource.Drawable.Icon);
            dialog.SetMessage("Adjust article text size:");
            dialog.SetTitle("Text Size");
            dialog.SetNeutralButton("Close",
                                    (o, args) =>
            {
                // Close dialog
            });
            dialog.SetView(seek);

            return(dialog.Create());
        }
예제 #7
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Third);

            Button startBtn = FindViewById <Button>(Resource.Id.startBtn);

            startBtn.Click += StartBtn_Click;
            Button stopBtn = FindViewById <Button>(Resource.Id.stopBtn);

            stopBtn.Click += StopBtn_Click;

            pb = FindViewById <ProgressBar>(Resource.Id.pb1);
            SeekBar sb = FindViewById <SeekBar>(Resource.Id.seekBar);

            v = FindViewById <TextView>(Resource.Id.infoTxt);
            sb.SetOnSeekBarChangeListener(this);
            pb.Max = 100;

            onFinish += () => {
                var view = LayoutInflater.Inflate(Resource.Layout.Forth, null);
                var info = view.FindViewById <TextView>(Resource.Id.toastText);
                info.Text = "Lol kek cheburec!";
                Toast t = new Toast(this);
                t.View     = view;
                t.Duration = ToastLength.Short;
                //t.SetGravity(GravityFlags.Center,0,0);
                t.Show();
                StartActivity(typeof(Forth));
            };
        }
예제 #8
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.FastSearch);
            toolbar = FindViewById <SupportToolbar>(Resource.Id.toolbarChild);
            toolbar.SetTitle(Resource.String.fastSearch);

            SetSupportActionBar(toolbar);

            toolbar.SetNavigationIcon(Resource.Drawable.abc_ic_ab_back_mtrl_am_alpha);

            //set imageButton
            listItemGridView.Add(new Item()
            {
                textView = "School", imageButton = Resource.Drawable.school
            });
            listItemGridView.Add(new Item()
            {
                textView = "Park", imageButton = Resource.Drawable.park
            });
            listItemGridView.Add(new Item()
            {
                textView = "Hopital", imageButton = Resource.Drawable.Hopital
            });
            listItemGridView.Add(new Item()
            {
                textView = "Bank", imageButton = Resource.Drawable.bank
            });
            listItemGridView.Add(new Item()
            {
                textView = "Repairs", imageButton = Resource.Drawable.repairs
            });
            listItemGridView.Add(new Item()
            {
                textView = "Coffee", imageButton = Resource.Drawable.coffee
            });
            listItemGridView.Add(new Item()
            {
                textView = "Shop", imageButton = Resource.Drawable.shop
            });
            listItemGridView.Add(new Item()
            {
                textView = "Gas", imageButton = Resource.Drawable.gas
            });
            listItemGridView.Add(new Item()
            {
                textView = "Add", imageButton = Resource.Drawable.addFastSearch
            });


            gridViewImageButton = FindViewById <GridView>(Resource.Id.gridviewFastSearch);
            GridviewFastSearch adapter = new GridviewFastSearch(this, listItemGridView);

            gridViewImageButton.Adapter = adapter;

            //process seekbar
            seekBar = FindViewById <SeekBar>(Resource.Id.seekBar);
            radius  = FindViewById <TextView>(Resource.Id.radius);
            seekBar.SetOnSeekBarChangeListener(this);
        }
예제 #9
0
        // Volume bar
        private void initBar(SeekBar bar, Android.Media.Stream stream)
        {
            //
            bar.Max      = mgr.GetStreamMaxVolume(stream);
            bar.Progress = mgr.GetStreamVolume(stream);

            //
            bar.SetOnSeekBarChangeListener(new VolumeListener(mgr, stream));
        }
        private void InitPreference(Context context, IAttributeSet attrs)
        {
            SetValuesFromXml(attrs);

            seekBar     = new SeekBar(context, attrs);
            seekBar.Max = maxValue - minValue;
            seekBar.SetOnSeekBarChangeListener(this);

            this.WidgetLayoutResource = Resource.Layout.seek_bar_preference;
        }
예제 #11
0
            public SeekBarWrap(int minVal, int maxVal, SeekBar seekBar, TextView nameView, TextView seekBarValue, GameSettingsActivity activity)
            {
                this.seekBar      = seekBar;
                this.nameView     = nameView;
                this.seekBarValue = seekBarValue;
                this.minVal       = minVal;
                this.maxVal       = maxVal;

                seekBar.Max = maxVal - minVal;
                Value       = 0;
                seekBar.SetOnSeekBarChangeListener(activity);
            }
예제 #12
0
 public void Reset()
 {
     activity.RunOnUiThread(delegate {
         play_button.Text        = "Play";
         timeline_text_view.Text = GetTimeline(0, TimeSpan.Zero);
         // Since our AudioTrack bitrate is fake, those markers must be faked too.
         seekbar.Max               = (int)total_length;
         seekbar.Progress          = 0;
         seekbar.SecondaryProgress = (int)loop_end;
         seekbar.SetOnSeekBarChangeListener(this);
     });
 }
예제 #13
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var v = inflater.Inflate(Resource.Layout.tinting_fragment, null);

            // Set a drawable as the image to display
            image = (ImageView)v.FindViewById(Resource.Id.image);
            image.SetImageResource(Resource.Drawable.btn_default_normal_holo);

            // Get text labels and seekbars for the four color components
            alphaBar  = (SeekBar)v.FindViewById(Resource.Id.alphaSeek);
            alphaText = (TextView)v.FindViewById(Resource.Id.alphaText);
            greenBar  = (SeekBar)v.FindViewById(Resource.Id.greenSeek);
            greenText = (TextView)v.FindViewById(Resource.Id.greenText);
            redBar    = (SeekBar)v.FindViewById(Resource.Id.redSeek);
            redText   = (TextView)v.FindViewById(Resource.Id.redText);
            blueBar   = (SeekBar)v.FindViewById(Resource.Id.blueSeek);
            blueText  = (TextView)v.FindViewById(Resource.Id.blueText);

            // Set a listener to update tinted image when selections have changed
            alphaBar.SetOnSeekBarChangeListener(new MySeekBarChangeListener(this));
            greenBar.SetOnSeekBarChangeListener(new MySeekBarChangeListener(this));
            redBar.SetOnSeekBarChangeListener(new MySeekBarChangeListener(this));
            blueBar.SetOnSeekBarChangeListener(new MySeekBarChangeListener(this));


            // Set up the spinner for blend mode selection from a string array resource
            blendSpinner = (Spinner)v.FindViewById(Resource.Id.blendSpinner);
            ISpinnerAdapter sa = ArrayAdapter.CreateFromResource(Activity,
                                                                 Resource.Array.blend_modes, Android.Resource.Layout.SimpleSpinnerDropDownItem);

            blendSpinner.Adapter = sa;
            // Set a listener to update the tinted image when a blend mode is selected
            blendSpinner.OnItemSelectedListener = new MyBlendListener(this);
            // Select the first item
            blendSpinner.SetSelection(0);
            mode = MODES [0];

            if (savedInstanceState != null)
            {
                // Resore the previous state if this fragment has been restored
                blendSpinner.SetSelection(savedInstanceState.GetInt(STATE_BLEND));
                alphaBar.Progress = savedInstanceState.GetInt(STATE_ALPHA);
                redBar.Progress   = savedInstanceState.GetInt(STATE_RED);
                greenBar.Progress = savedInstanceState.GetInt(STATE_GREEN);
                blueBar.Progress  = savedInstanceState.GetInt(STATE_BLUE);
            }

            // Apply the default blend mode and color
            UpdateTint(GetColor(), GetTintMode());

            return(v);
        }
예제 #14
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.register_farmer);
            phval = FindViewById <TextView>(Resource.Id.textView2);
            Button add = FindViewById <Button>(Resource.Id.button1);

            System.Diagnostics.Debug.WriteLine("In resister farmer page...");
            add.Click += delegate
            {
                System.Diagnostics.Debug.WriteLine("In resister farmer page to enter details...");
                EditText address    = FindViewById <EditText>(Resource.Id.editText1);
                EditText cnum       = FindViewById <EditText>(Resource.Id.editText2);
                EditText raspi_name = FindViewById <EditText>(Resource.Id.editText11);
                SeekBar  ph         = FindViewById <SeekBar>(Resource.Id.seekBar1);
                ph.SetOnSeekBarChangeListener(this);
                RadioGroup  dg       = FindViewById <RadioGroup>(Resource.Id.radioGroup1);
                RadioButton rb       = FindViewById <RadioButton>(dg.CheckedRadioButtonId);
                string      district = rb.Text;
                EditText    height   = FindViewById <EditText>(Resource.Id.editText1);
                farmer_data data     = new farmer_data();
                data.email             = Global_portable.email;
                data.address           = address.Text;
                data.district          = district;
                data.phone_number      = cnum.Text;
                data.raspberry_id      = raspi_name.Text;
                data.soil_ph           = "5";
                data.water_tank_height = height.Text;
                string json = JsonConvert.SerializeObject(data);
                System.Diagnostics.Debug.WriteLine("Json object" + json);
                string url     = "http://192.168.0.4:5010/add_farmer_details";
                var    content = new StringContent(json, Encoding.UTF8, "application/json");
                using (var client = new HttpClient())
                {
                    var    result = client.PostAsync(url, content).Result;
                    string res    = "";
                    using (HttpContent content3 = result.Content)
                    {
                        // ... Read the string.
                        Task <string> result2 = content3.ReadAsStringAsync();
                        res = result2.Result;
                        System.Diagnostics.Debug.WriteLine("response in farm data page ress" + res);
                    }
                }
                //net.azurewebsites.agc20171.AISCM a = new net.azurewebsites.agc20171.AISCM();
                //net.azurewebsites.aiscm.WebService1 w = new net.azurewebsites.aiscm.WebService1();
                System.Diagnostics.Debug.WriteLine("email: " + Global_portable.email);
                //w.add_farmer_details(Global_portable.email, address.Text, cnum.Text, phval.Text, district, height.Text,raspi_name.Text);
                System.Diagnostics.Debug.WriteLine("Successfully executed add farmer query...");
                StartActivity(typeof(Login));
            };
        }
        void InitializeSeekBars()
        {
            // Setup WidthSeekBar
            WidthSeekBar = FindViewById(Resource.Id.seek_bar_width) as SeekBar;
            int widthValue = (int)(100 * (float)Constants.WIDTH_DEFAULT / Constants.WIDTH_MAX);

            WidthSeekBar.Progress = widthValue;
            var widthTextView = FindViewById(Resource.Id.textview_width) as TextView;

            widthTextView.Text = String.ValueOf(widthValue);
            var widthSeekBarListener = new SeekBarListenerImpl
            {
                mActivity    = this,
                mTextView    = widthTextView,
                mSeekBarType = SeekBarListenerImpl.SeekBarType.WIDTH
            };

            WidthSeekBar.SetOnSeekBarChangeListener(widthSeekBarListener);

            // Setup WeightSeekBar
            WeightSeekBar = FindViewById(Resource.Id.seek_bar_weight) as SeekBar;
            float weightValue = Constants.WEIGHT_DEFAULT / Constants.WEIGHT_MAX * 100;

            WeightSeekBar.Progress = (int)weightValue;
            var weightTextView = FindViewById(Resource.Id.textview_weight) as TextView;

            weightTextView.Text = String.ValueOf(Constants.WEIGHT_DEFAULT);
            var weightSeekBarListener = new SeekBarListenerImpl
            {
                mActivity    = this,
                mTextView    = weightTextView,
                mSeekBarType = SeekBarListenerImpl.SeekBarType.WEIGHT
            };

            WeightSeekBar.SetOnSeekBarChangeListener(weightSeekBarListener);

            // Setup ItalicSeekBar
            ItalicSeekBar          = FindViewById(Resource.Id.seek_bar_italic) as SeekBar;
            ItalicSeekBar.Progress = (int)Constants.ITALIC_DEFAULT;
            var italicTextView = FindViewById(Resource.Id.textview_italic) as TextView;

            italicTextView.Text = String.ValueOf(Constants.ITALIC_DEFAULT);
            var italicSeekBarListener = new SeekBarListenerImpl
            {
                mActivity    = this,
                mTextView    = italicTextView,
                mSeekBarType = SeekBarListenerImpl.SeekBarType.ITALIC
            };

            ItalicSeekBar.SetOnSeekBarChangeListener(italicSeekBarListener);
        }
예제 #16
0
        private void Initialize()
        {
            _seekBar = FindViewById <SeekBar>(Resource.Id.SeekBarHomeworkProgress);
            _seekBar.SetOnSeekBarChangeListener(this);

            _imageButtonDone        = FindViewById <ImageButton>(Resource.Id.ImageButtonHomeworkProgressDone);
            _imageButtonDone.Click += _imageButtonDone_Click;

            _imageButtonIncomplete        = FindViewById <ImageButton>(Resource.Id.ImageButtonHomeworkProgressIncomplete);
            _imageButtonIncomplete.Click += _imageButtonIncomplete_Click;

            // Initially call OnProgressChanged so that the background colors get set correctly for non-API-21 devices
            OnProgressChanged(_seekBar, 0, false);
        }
예제 #17
0
        private void InitComponent(View view)
        {
            try
            {
                IconBack = view.FindViewById <TextView>(Resource.Id.IconBack);

                IconDistance     = view.FindViewById <TextView>(Resource.Id.IconDistance);
                TxtDistanceCount = view.FindViewById <TextView>(Resource.Id.Distancenumber);

                LayoutJobType    = view.FindViewById <RelativeLayout>(Resource.Id.LayoutJobType);
                LayoutCategories = view.FindViewById <RelativeLayout>(Resource.Id.LayoutCategories);

                DistanceBar     = view.FindViewById <SeekBar>(Resource.Id.distanceSeeker);
                DistanceBar.Max = 300;
                DistanceBar.SetOnSeekBarChangeListener(this);

                IconJobType     = view.FindViewById <TextView>(Resource.Id.IconJobType);
                TxtJobType      = view.FindViewById <TextView>(Resource.Id.textJobType);
                JobTypeMoreIcon = view.FindViewById <TextView>(Resource.Id.JobTypeMoreIcon);

                IconCategories     = view.FindViewById <TextView>(Resource.Id.IconCategories);
                TxtCategories      = view.FindViewById <TextView>(Resource.Id.textCategories);
                CategoriesMoreIcon = view.FindViewById <TextView>(Resource.Id.CategoriesMoreIcon);

                BtnApply = view.FindViewById <Button>(Resource.Id.ApplyButton);

                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeLight, IconDistance, FontAwesomeIcon.StreetView);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconBack, AppSettings.FlowDirectionRightToLeft ? IonIconsFonts.IosArrowDropright : IonIconsFonts.IosArrowDropleft);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeBrands, IconCategories, FontAwesomeIcon.Buromobelexperte);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeLight, IconJobType, FontAwesomeIcon.Briefcase);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, JobTypeMoreIcon, AppSettings.FlowDirectionRightToLeft ? IonIconsFonts.IosArrowDropleft : IonIconsFonts.IosArrowDropright);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, CategoriesMoreIcon, AppSettings.FlowDirectionRightToLeft ? IonIconsFonts.IosArrowDropleft : IonIconsFonts.IosArrowDropright);

                switch (Build.VERSION.SdkInt)
                {
                case >= BuildVersionCodes.N:
                    DistanceBar.SetProgress(string.IsNullOrEmpty(UserDetails.FilterJobLocation) ? 300 : Convert.ToInt32(UserDetails.FilterJobLocation), true);
                    break;

                // For API < 24
                default:
                    DistanceBar.Progress = string.IsNullOrEmpty(UserDetails.FilterJobLocation) ? 300 : Convert.ToInt32(UserDetails.FilterJobLocation);
                    break;
                }
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
예제 #18
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Search);
            toolbar = FindViewById <SupportToolbar>(Resource.Id.toolbarChild);
            toolbar.SetTitle(Resource.String.search);

            SetSupportActionBar(toolbar);

            toolbar.SetNavigationIcon(Resource.Drawable.abc_ic_ab_back_mtrl_am_alpha);

            //process seekbar
            seekBar = FindViewById <SeekBar>(Resource.Id.seekBar);
            radius  = FindViewById <TextView>(Resource.Id.radius);
            seekBar.SetOnSeekBarChangeListener(this);
        }
        private void InitComponent(View view)
        {
            try
            {
                IconBack = view.FindViewById <TextView>(Resource.Id.IconBack);

                IconDistance     = view.FindViewById <TextView>(Resource.Id.IconDistance);
                TxtDistanceCount = view.FindViewById <TextView>(Resource.Id.Distancenumber);

                LayoutJobType    = view.FindViewById <RelativeLayout>(Resource.Id.LayoutJobType);
                LayoutCategories = view.FindViewById <RelativeLayout>(Resource.Id.LayoutCategories);

                DistanceBar     = view.FindViewById <SeekBar>(Resource.Id.distanceSeeker);
                DistanceBar.Max = 300;
                DistanceBar.SetOnSeekBarChangeListener(this);

                IconJobType     = view.FindViewById <TextView>(Resource.Id.IconJobType);
                TxtJobType      = view.FindViewById <TextView>(Resource.Id.textJobType);
                JobTypeMoreIcon = view.FindViewById <TextView>(Resource.Id.JobTypeMoreIcon);

                IconCategories     = view.FindViewById <TextView>(Resource.Id.IconCategories);
                TxtCategories      = view.FindViewById <TextView>(Resource.Id.textCategories);
                CategoriesMoreIcon = view.FindViewById <TextView>(Resource.Id.CategoriesMoreIcon);

                BtnApply = view.FindViewById <Button>(Resource.Id.ApplyButton);

                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeLight, IconDistance, FontAwesomeIcon.StreetView);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconBack, IonIconsFonts.ChevronLeft);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeBrands, IconCategories, FontAwesomeIcon.Buromobelexperte);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.FontAwesomeLight, IconJobType, FontAwesomeIcon.Briefcase);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, JobTypeMoreIcon, IonIconsFonts.ChevronRight);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, CategoriesMoreIcon, IonIconsFonts.ChevronRight);

                if (Build.VERSION.SdkInt >= BuildVersionCodes.N)
                {
                    DistanceBar.SetProgress(string.IsNullOrEmpty(UserDetails.FilterJobLocation) ? 300 : int.Parse(UserDetails.FilterJobLocation), true);
                }
                else  // For API < 24
                {
                    DistanceBar.Progress = string.IsNullOrEmpty(UserDetails.FilterJobLocation) ? 300 : int.Parse(UserDetails.FilterJobLocation);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        private void SetupDemo3()
        {
            _ledBrightnessView = FindViewById <SeekBar>(Resource.Id.ledBrightness);

            try
            {
                _display = RainbowHat.OpenDisplay();
                _display.SetEnabled(true);
                _display.Display("HEY");
            }
            catch (IOException ex)
            {
                Log.Error(TAG, "Error during onCreate!", ex);
            }

            _ledBrightnessView.SetOnSeekBarChangeListener(this);
        }
        private void SetupDemo3()
        {
            _ledBrightnessView = FindViewById <SeekBar>(Resource.Id.ledBrightness);

            try
            {
                _pwm1 = _service.OpenPwm("PWM1");
                _pwm1.SetPwmFrequencyHz(120);
                _pwm1.SetEnabled(true);
            }
            catch (IOException ex)
            {
                Log.Error(TAG, "Error during onCreate!", ex);
            }

            _ledBrightnessView.SetOnSeekBarChangeListener(this);
        }
예제 #22
0
        private void InitComponent(View view)
        {
            try
            {
                IconBack = view.FindViewById <TextView>(Resource.Id.IconBack);

                GenderRecycler = view.FindViewById <RecyclerView>(Resource.Id.GenderRecyler);


                TxtDistanceCount = view.FindViewById <TextView>(Resource.Id.Distancenumber);
                DistanceBar      = view.FindViewById <SeekBar>(Resource.Id.distanceSeeker);

                ButtonOffline    = view.FindViewById <Button>(Resource.Id.OfflineButton);
                ButtonOnline     = view.FindViewById <Button>(Resource.Id.OnlineButton);
                BothStatusButton = view.FindViewById <Button>(Resource.Id.BothStatusButton);
                BtnApply         = view.FindViewById <Button>(Resource.Id.ApplyButton);
                ResetTextView    = view.FindViewById <TextView>(Resource.Id.Resetbutton);

                LayoutRelationship = view.FindViewById <RelativeLayout>(Resource.Id.LayoutRelationship);

                TxtRelationship      = view.FindViewById <TextView>(Resource.Id.textRelationship);
                RelationshipMoreIcon = view.FindViewById <TextView>(Resource.Id.RelationshipMoreIcon);

                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconBack, AppSettings.FlowDirectionRightToLeft ? IonIconsFonts.IosArrowDropright : IonIconsFonts.IosArrowDropleft);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, RelationshipMoreIcon, AppSettings.FlowDirectionRightToLeft ? IonIconsFonts.IosArrowDropleft : IonIconsFonts.IosArrowDropright);

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

                switch (Build.VERSION.SdkInt)
                {
                case >= BuildVersionCodes.N:
                    DistanceBar.SetProgress(string.IsNullOrEmpty(UserDetails.NearByDistanceCount) ? 300 : Convert.ToInt32(UserDetails.NearByDistanceCount), true);
                    break;

                // For API < 24
                default:
                    DistanceBar.Progress = string.IsNullOrEmpty(UserDetails.NearByDistanceCount) ? 300 : Convert.ToInt32(UserDetails.NearByDistanceCount);
                    break;
                }
            }
            catch (Exception e)
            {
                Methods.DisplayReportResultTrack(e);
            }
        }
예제 #23
0
        private void InitSeekBar()
        {
            complexitySeekbar = FindViewById <SeekBar>(Resource.Id.seekbar_complexity);
            breakSeekbar      = FindViewById <SeekBar>(Resource.Id.seekbar_break);
            fallSeekbar       = FindViewById <SeekBar>(Resource.Id.seekbar_fall);
            radiusSeekbar     = FindViewById <SeekBar>(Resource.Id.seekbar_radius);
            complexityTv      = FindViewById <TextView>(Resource.Id.complexity_value);
            breakTv           = FindViewById <TextView>(Resource.Id.break_value);
            fallTv            = FindViewById <TextView>(Resource.Id.fall_value);
            radiusTv          = FindViewById <TextView>(Resource.Id.radius_value);

            SeekBar.IOnSeekBarChangeListener listener = this;
            complexitySeekbar.SetOnSeekBarChangeListener(listener);
            breakSeekbar.SetOnSeekBarChangeListener(listener);
            fallSeekbar.SetOnSeekBarChangeListener(listener);
            radiusSeekbar.SetOnSeekBarChangeListener(listener);
        }
예제 #24
0
        private void SetupViews()
        {
            gain0 = FindViewById(Resource.Id.gain0) as SeekBar;
            gain0.SetOnSeekBarChangeListener(this);

            gain0.Progress = 0;

            but_a1_0          = FindViewById(Resource.Id.A1_0) as ToggleButton;
            but_a2_0          = FindViewById(Resource.Id.A2_0) as ToggleButton;
            but_a3_0          = FindViewById(Resource.Id.A3_0) as ToggleButton;
            but_b1_0          = FindViewById(Resource.Id.B1_0) as ToggleButton;
            but_b2_0          = FindViewById(Resource.Id.B2_0) as ToggleButton;
            but_mute_0        = FindViewById(Resource.Id.Mute_0) as ToggleButton;
            but_solo_0        = FindViewById(Resource.Id.Solo_0) as ToggleButton;
            but_mono_0        = FindViewById(Resource.Id.Mono_0) as ToggleButton;
            pb_0              = FindViewById(Resource.Id.levels_0) as ProgressBar;
            ViewReferencesSet = true;
        }
예제 #25
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            //инициализируем сенсорный менеджер
            sensorManager = (SensorManager)GetSystemService(SensorService);
            //инициализируем медиа проигрыватель

            mp      = MediaPlayer.Create(this, Resource.Raw.music);
            seekBar = FindViewById <SeekBar>(Resource.Id.seekBarForVolume);
            text    = (TextView)FindViewById <TextView>(Resource.Id.textStatus);

            volume = 0.5f;
            seekBar.SetOnSeekBarChangeListener(this);
            seekBar.Progress = (int)(volume * 100);
        }
        private void InitComponent(View view)
        {
            try
            {
                IconBack = view.FindViewById <TextView>(Resource.Id.IconBack);

                GenderRecycler = view.FindViewById <RecyclerView>(Resource.Id.GenderRecyler);


                TxtDistanceCount = view.FindViewById <TextView>(Resource.Id.Distancenumber);
                DistanceBar      = view.FindViewById <SeekBar>(Resource.Id.distanceSeeker);

                ButtonOffline    = view.FindViewById <Button>(Resource.Id.OfflineButton);
                ButtonOnline     = view.FindViewById <Button>(Resource.Id.OnlineButton);
                BothStatusButton = view.FindViewById <Button>(Resource.Id.BothStatusButton);
                BtnApply         = view.FindViewById <Button>(Resource.Id.ApplyButton);
                ResetTextView    = view.FindViewById <TextView>(Resource.Id.Resetbutton);

                LayoutRelationship = view.FindViewById <RelativeLayout>(Resource.Id.LayoutRelationship);

                TxtRelationship      = view.FindViewById <TextView>(Resource.Id.textRelationship);
                RelationshipMoreIcon = view.FindViewById <TextView>(Resource.Id.RelationshipMoreIcon);


                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, IconBack, AppSettings.FlowDirectionRightToLeft ? IonIconsFonts.ChevronRight : IonIconsFonts.ChevronLeft);
                FontUtils.SetTextViewIcon(FontsIconFrameWork.IonIcons, RelationshipMoreIcon, AppSettings.FlowDirectionRightToLeft ? IonIconsFonts.ChevronLeft : IonIconsFonts.ChevronRight);

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

                if (Build.VERSION.SdkInt >= BuildVersionCodes.N)
                {
                    DistanceBar.SetProgress(string.IsNullOrEmpty(UserDetails.NearByDistanceCount) ? 300 : int.Parse(UserDetails.NearByDistanceCount), true);
                }
                else  // For API < 24
                {
                    DistanceBar.Progress = string.IsNullOrEmpty(UserDetails.NearByDistanceCount) ? 300 : int.Parse(UserDetails.NearByDistanceCount);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
예제 #27
0
        protected override void OnBindDialogView(View view)
        {
            base.OnBindDialogView(view);

            if (ShouldPersist())
            {
                _progress = GetPersistedInt(_defaultValue + _minimumValue) - _minimumValue;
            }


            _valueText = view.FindViewById <TextView>(Resource.Id.Label);

            _seekBar = view.FindViewById <SeekBar>(Resource.Id.SeekBar);
            _seekBar.SetOnSeekBarChangeListener(this);
            _seekBar.Max      = _maximumValue;
            _seekBar.Progress = _progress;

            updateText();
        }
예제 #28
0
 private void InitControllerView(View v)
 {
     mPauseButton = v.FindViewById <ImageButton>(Resource.Id.media_controller_play_pause);
     mTvPlay      = v.FindViewById <ImageView>(Resource.Id.media_controller_tv_play);
     if (mPauseButton != null && mTvPlay != null)
     {
         mPauseButton.RequestFocus();
         mPauseButton.Clickable = true;
         mPauseButton.Click    += delegate
         {
             DoPauseResume();
             Show(sDefaultTimeout);
         };
         mTvPlay.RequestFocus();
         mTvPlay.Clickable = true;
         mTvPlay.Click    += delegate
         {
             DoPauseResume();
             Show(sDefaultTimeout);
         };
     }
     mProgress = v.FindViewById <SeekBar>(Resource.Id.media_controller_seekbar);
     if (mProgress != null)
     {
         mProgress.SetOnSeekBarChangeListener(this);
         mProgress.ThumbOffset = 1;
         mProgress.Max         = 1000;
     }
     mEndTime     = v.FindViewById <TextView>(Resource.Id.media_controller_time_total);
     mCurrentTime = v.FindViewById <TextView>(Resource.Id.media_controller_time_current);
     mTitleView   = v.FindViewById <TextView>(Resource.Id.media_controller_title);
     if (mTitleView != null)
     {
         mTitleView.Text = mTitle;
     }
     mBack        = v.FindViewById <ImageView>(Resource.Id.media_controller_back);
     mBack.Click += delegate
     {
         DoPauseResume();
         Show(sDefaultTimeout);
         mVideoBackListener.Back();
     };
 }
예제 #29
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            // Get our button from the layout resource,
            // and attach an event to it
            _button             = FindViewById <Button>(Resource.Id.button1);
            _button.Click      += UpdatePolyLib;
            _animSButton        = FindViewById <Button>(Resource.Id.animSButton);
            _animSButton.Click += sweepAnimation;
            _animGButton        = FindViewById <Button>(Resource.Id.animGButton);
            _animGButton.Click += growAnimation;

            _polyLibView = FindViewById <PolyLibView>(Resource.Id.imageView1);
            _polyLibView.SetOnTouchListener(this);

            _currentTriangulation = _polyLibView.CurrentTriangulation;

            _widthTB  = FindViewById <TextView>(Resource.Id.widthTextBox);
            _heightTB = FindViewById <TextView>(Resource.Id.heightTextBox);
            _varTB    = FindViewById <TextView>(Resource.Id.varTextBox);
            _sizeTB   = FindViewById <TextView>(Resource.Id.sizeTextBox);
            _seedSeek = FindViewById <SeekBar>(Resource.Id.seedSeek);
            _freqSeek = FindViewById <SeekBar>(Resource.Id.frequencySeek);

            _controlsContainer = FindViewById <LinearLayout>(Resource.Id.controlsContainer);

            _seedSeek.SetOnSeekBarChangeListener(this);
            _freqSeek.SetOnSeekBarChangeListener(this);


            var metrics = Resources.DisplayMetrics;

            _widthTB.Text  = metrics.WidthPixels.ToString();
            _heightTB.Text = metrics.HeightPixels.ToString();

            _varTB.Text  = ".75";
            _sizeTB.Text = "150";
        }
예제 #30
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.ColorSliders, null);

            layout = view.FindViewById <LinearLayout>(Resource.Id.layoutSliders);

            textRed   = view.FindViewById <TextView>(Resource.Id.textRed);
            textGreen = view.FindViewById <TextView>(Resource.Id.textGreen);
            textBlue  = view.FindViewById <TextView>(Resource.Id.textBlue);

            seekBarRed   = view.FindViewById <SeekBar>(Resource.Id.seekBarRed);
            seekBarGreen = view.FindViewById <SeekBar>(Resource.Id.seekBarGreen);
            seekBarBlue  = view.FindViewById <SeekBar>(Resource.Id.seekBarBlue);

            seekBarRed.SetOnSeekBarChangeListener(this);
            seekBarGreen.SetOnSeekBarChangeListener(this);
            seekBarBlue.SetOnSeekBarChangeListener(this);

            return(view);
        }