void KeepMe() { var txt = new TextView(null); txt.Text = txt.Text; var iv = new ImageView(null); var obj = iv.Drawable; var prog = new ProgressBar(null); prog.Progress = prog.Progress; var cb = new RadioButton(null); cb.Checked = cb.Checked; var np = new NumberPicker(null); np.Value = np.Value; var rb = new RatingBar(null); rb.Rating = rb.Rating; var cv = new CalendarView(null); cv.Date = cv.Date; var th = new TabHost(null); th.CurrentTab = th.CurrentTab; var tp = new TimePicker(null); tp.CurrentHour = tp.CurrentHour; tp.CurrentMinute = tp.CurrentMinute; }
protected override void OnElementChanged(ElementChangedEventArgs <RatingBar> e) { base.OnElementChanged(e); if (this.RB != null) { this.RB.RatingBarChange -= this.RB_RatingBarChange; } this.RB = new AW.RatingBar(Forms.Context) { //放到Update 中,会导致应用挂起 //也就是说,运行中,不能修改 Step StepSize = this.Element.Step }; this.RB.RatingBarChange += RB_RatingBarChange; var liner = new AW.LinearLayout(Forms.Context); this.SetNativeControl(liner); this.Control.AddView(this.RB); this.RB.RatingBarChange += Control_RatingBarChange; this.Update(); }
public virtual Com.Zhy.Adapter.Abslistview.ViewHolder SetRating(int viewId, float rating) { Android.Widget.RatingBar view = GetView <RatingBar>(viewId); view.Rating = (rating); return(this); }
protected override void OnCreate (Bundle savedInstanceState) { base.OnCreate (savedInstanceState); // Set our view from the "main" layout resource this.SetContentView (Resource.Layout.movie_detail); // Create your application here var strConfig = this.Intent.Extras.GetString ("Configuration"); var strSelectedMovie = this.Intent.Extras.GetString ("SelectedMovie"); this.configuration = JsonConvert.DeserializeObject<ConfigurationResponse> (strConfig); this.movieDetail = JsonConvert.DeserializeObject<Movie> (strSelectedMovie); this.btnPlay = this.FindViewById<Button> (Resource.Id.movie_detail_btnPlay); this.btnPlay.Click += this.btnPlay_Click; this.btnFavorite = this.FindViewById<Button> (Resource.Id.movie_detail_btnFavorite); this.btnFavorite.Click += this.btnFavorite_Click; this.btnClose = this.FindViewById<ImageButton> (Resource.Id.movie_detail_close); this.btnClose.Click += this.btnClose_Click; this.txtTitle = this.FindViewById<TextView> (Resource.Id.movie_detail_txtTitle); this.txtReleaseDate = this.FindViewById<TextView> (Resource.Id.movie_detail_txtReleaseDate); this.ratingBar = this.FindViewById<RatingBar> (Resource.Id.movie_detail_ratingBar); this.txtVoteCount = this.FindViewById<TextView> (Resource.Id.movie_detail_txtVoteCount); this.txtOverview = this.FindViewById<TextView> (Resource.Id.movie_detail_txtOverview); this.imgPoster = this.FindViewById<ImageView> (Resource.Id.movie_detail_imgPoster); this.vwSimilarMovies = this.FindViewById<RelativeLayout> (Resource.Id.movie_detail_vwSimilarMovies); this.movieList = this.FindViewById<RecyclerView>(Resource.Id.movie_detail_lstSimilarMovies); this.movieLayoutManager = new LinearLayoutManager (this, LinearLayoutManager.Horizontal, false); this.movieList.SetLayoutManager (this.movieLayoutManager); this.updateLayout (); }
public virtual Com.Zhy.Adapter.Recyclerview.Base.ViewHolder SetRating(int viewId, float rating, int max) { Android.Widget.RatingBar view = GetView <RatingBar>(viewId); view.Max = (max); view.Rating = (rating); return(this); }
public RestaurantViewHolder(View itemView, Action<int> handler) : base(itemView) { #pragma warning disable CS0618 // Type or member is obsolete itemView.Click += (object sender, EventArgs e) => handler(base.Position); #pragma warning restore CS0618 // Type or member is obsolete NameTextView = itemView.FindViewById<TextView>(Resource.Id.nameTextView); RatingsBar = itemView.FindViewById<RatingBar>(Resource.Id.ratingsBar); }
void RatingBar_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e) { var target = Target as RatingBar; if (target == null) return; var value = target.Rating; FireValueChanged(value); }
protected override void Dispose(bool disposing) { if (disposing && !this.IsDisposed) { if (this.RB != null) { this.RB.Dispose(); this.RB = null; } } base.Dispose(disposing); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { base.OnCreateView(inflater, container, savedInstanceState); var view = inflater.Inflate(Resource.Layout.ItemInputForm, container, false); mitem_cost = view.FindViewById<EditText>(Resource.Id.item_cost); mitem_brief = view.FindViewById<EditText>(Resource.Id.item_brief); mitem_description = view.FindViewById<EditText>(Resource.Id.item_desc); mitem_priority = view.FindViewById<RatingBar>(Resource.Id.item_priority); Button savebtn = view.FindViewById<Button>(Resource.Id.savebtn); //user has clicked the save button savebtn.Click += btn_onSaveShopItems; if(mShopItem != null) setitemcontent(); return view; }
protected override void OnCreate(Bundle bundle) { base.OnCreate (bundle); gmb = new Gmusicbrowser("macdesktop.orospakr.ca", 8081); // Set our view from the "main" layout resource SetContentView (Resource.Layout.Main); playButton = FindViewById<ImageButton> (Resource.Id.PlayButton); titleTextView = FindViewById <TextView> (Resource.Id.TitleTextView); artistTextView = FindViewById <TextView> (Resource.Id.ArtistTextView); ratingBar = FindViewById <RatingBar> (Resource.Id.RatingBar); nextButton = FindViewById <ImageButton> (Resource.Id.NextButton); prevButton = FindViewById <ImageButton> (Resource.Id.PrevButton); volumeSeekBar = FindViewById <SeekBar> (Resource.Id.VolumeSeekBar); songSeekBar = FindViewById <SeekBar> (Resource.Id.SongSeekbar); playButton.Click += (sender, args) => { // button.Text = string.Format ("{0} clicks!", count++); gmb.PushNewPlayerState(new Player() { Playing = currentState.Playing == 1 ? 0 : 1 }).ContinueWith((playerResult) => { if(playerResult.IsFaulted) { } else { HandleUpdatedStateFromNetwork(playerResult.Result); } }); }; ratingBar.RatingBarChange += (sender, e) => { if(currentState != null && currentState.Current != null) { var newSong = new Song() { Id = currentState.Current.Id, Rating = (int)(ratingBar.Rating * 20)}; gmb.PostUpdatedSong(newSong); } }; nextButton.Click += (sender, e) => { gmb.Next().ContinueWith((playerResult) => { HandleUpdatedStateFromNetwork(playerResult.Result); }); }; prevButton.Click += (sender, e) => { gmb.Previous ().ContinueWith((playerResult) => { HandleUpdatedStateFromNetwork(playerResult.Result); }); }; volumeSeekBar.ProgressChanged += (sender, e) => { if(!preventSeekBarUpdates) { gmb.PushNewPlayerState (new Player() { Volume = volumeSeekBar.Progress / (float)100 }); } }; songSeekBar.ProgressChanged += (sender, e) => { if(!preventSeekBarUpdates) { gmb.PushNewPlayerState (new Player() { PlayPosition = songSeekBar.Progress }); } }; prog = new ProgressDialog (this); prog.SetProgressStyle(ProgressDialogStyle.Spinner); prog.SetMessage(this.GetString(Resource.String.connection_progress)); prog.Show (); }
public MvxRatingBarRatingTargetBinding(RatingBar target) : base(target) { }
public CardRatingViewHolder(View v) : base(v) { RatingBar = v.FindViewById<RatingBar>(Resource.Id.resultCard_ratingBar); }
public void OnRatingChanged(RatingBar ratingBar, float rating, bool fromUser) { RatingChanged.Invoke(ratingBar, new RatingChangedEventArgs(rating, fromUser)); }
private void InitComponents() { _customButton = _view.FindViewById<Button>(Resource.Id.customButton); _customButton.Click += customButton_Click; _checkBox = _view.FindViewById<CheckBox>(Resource.Id.checkBox); _checkBox.Click += checkBox_Click; _editText = _view.FindViewById<EditText>(Resource.Id.editText); _editText.KeyPress += editText_KeyPress; _radioRed = _view.FindViewById<RadioButton>(Resource.Id.radio_red); _radioRed.Click += RadioButton_Click; _radioBlue = _view.FindViewById<RadioButton>(Resource.Id.radio_blue); _radioBlue.Click += RadioButton_Click; _toggleButton = _view.FindViewById<ToggleButton>(Resource.Id.toggleButton); _toggleButton.Click += toggleSwitchButtons_Click; _switch = _view.FindViewById<Switch>(Resource.Id.switchButton); _switch.Click += toggleSwitchButtons_Click; _ratingBar = _view.FindViewById<RatingBar>(Resource.Id.ratingBar); _ratingBar.RatingBarChange += ratingBar_RatingBarChange; }
private void ratingBar_RatingBarChange(object sender, RatingBar.RatingBarChangeEventArgs e) { Toast.MakeText(_context, "Новый рейтинг: " + _ratingBar.Rating, ToastLength.Short).Show(); }