コード例 #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            var data = Intent.GetStringExtra("data");

            var item = Newtonsoft.Json.JsonConvert.DeserializeObject <Item>(data);

            viewModel = new ItemDetailViewModel(item);

            FindViewById <TextView>(Resource.Id.description).Text = item.Description;

            SupportActionBar.Title = item.Text;

            slider = FindViewById <Controls.FluidSlider>(Resource.Id.fluidSlider);

            slider.From          = 100;
            slider.To            = 400;
            slider.SelectedValue = 250;
            slider.ColorBar      = this.BaseContext.Resources.GetColor(Resource.Color.primary);
            //slider.ColorBubble = this.BaseContext.Resources.GetColor(Resource.Color.primary);

            slider.OnPositionChanged += (float value) =>
            {
                System.Diagnostics.Debug.WriteLine("Selected: " + value);
            };
        }
コード例 #2
0
        private void SetUpSlider()
        {
            slider = FindViewById <Controls.FluidSlider>(Resource.Id.fluidSlider);

            slider.From          = 100;
            slider.To            = 400;
            slider.SelectedValue = 250;
            slider.ColorBar      = this.BaseContext.Resources.GetColor(Resource.Color.primary);
            //slider.ColorBubble = this.BaseContext.Resources.GetColor(Resource.Color.primary);

            slider.OnPositionChanged += (float value) =>
            {
                System.Diagnostics.Debug.WriteLine("Selected: " + value);
            };
        }