Ejemplo n.º 1
0
 private void setUI()
 {
     headerTextView = View.FindViewById <TextView>(Resource.Id.categoryText);
     detailTextView = View.FindViewById <TextView>(Resource.Id.detailText);
     likeBtn        = View.FindViewById <Button>(Resource.Id.likeBtn);
     dislikeBtn     = View.FindViewById <Button>(Resource.Id.dislikeBtn);
     ratioBar       = View.FindViewById <LikeRatioBar>(Resource.Id.ratioBar);
     imageView      = View.FindViewById <SquareImageView>(Resource.Id.imageView);
 }
Ejemplo n.º 2
0
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            base.OnViewCreated(view, savedInstanceState);

            string id = Arguments.GetString("id");

            headerTextView = view.FindViewById <TextView>(Resource.Id.categoryText);
            detailTextView = view.FindViewById <TextView>(Resource.Id.detailText);
            likeBtn        = view.FindViewById <Button>(Resource.Id.likeBtn);
            dislikeBtn     = view.FindViewById <Button>(Resource.Id.dislikeBtn);
            ratioBar       = view.FindViewById <LikeRatioBar>(Resource.Id.ratioBar);
            imageView      = view.FindViewById <SquareImageView>(Resource.Id.imageView);

            likeBtn.Click    += (s, e) => sendVote(id, 1);
            dislikeBtn.Click += (s, e) => sendVote(id, -1);

            getPostDetails(id);
        }