Example #1
0
 public LatestPlayerListener(LatestResponsePlayerActivity mediaPlayerActivity)
 {
     this.mediaPlayerActivity = mediaPlayerActivity;
     LoadingProgressBar       = mediaPlayerActivity.FindViewById <ProgressBar>(Resource.Id.progressBar);
 }
Example #2
0
        //private readonly DefaultBandwidthMeter BandwidthMeter = new DefaultBandwidthMeter();
        //private IDataSourceFactory DefaultDataMediaFactory;


        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            RequestWindowFeature(WindowFeatures.NoTitle);
            Window.SetFlags(WindowManagerFlags.Fullscreen,
                            WindowManagerFlags.Fullscreen);

            Instance = this;
            SetContentView(Resource.Layout.MediaPlayerLayout);
            linearButton        = FindViewById <LinearLayout>(Resource.Id.linearButton);
            btnAcceptReject     = FindViewById <Button>(Resource.Id.btnAcceptReject);
            btnDelete           = FindViewById <Button>(Resource.Id.btnDelete);
            SimpleExoPlayerView = FindViewById <PlayerView>(Resource.Id.exo_media_player_view);
            SimpleExoPlayerView.SetShutterBackgroundColor(Color.Transparent);
            imgAudio           = FindViewById <ImageView>(Resource.Id.imgAudio);
            progressBar        = FindViewById <ProgressBar>(Resource.Id.progressBar);
            frameLayout        = FindViewById <FrameLayout>(Resource.Id.frameLayout);
            imgProfile         = FindViewById <ImageView>(Resource.Id.imgProfile);
            imgProfile.Click  += UserProfile_Click;
            txtUserName        = FindViewById <TextView>(Resource.Id.txtUserName);
            txtUserName.Click += UserProfile_Click;
            txtDescription     = FindViewById <TextView>(Resource.Id.txtDescription);
            txtdays            = FindViewById <TextView>(Resource.Id.txtdays);
            mediaList          = JsonConvert.DeserializeObject <List <AdminVideoResponse> >(Intent.GetStringExtra("mediaList"));
            selectedMedia      = JsonConvert.DeserializeObject <AdminVideoResponse>(Intent.GetStringExtra("selectedMedia"));
            //videoId = Intent.GetStringExtra("videoId");
            linearButton.Visibility    = ViewStates.Visible;
            btnAcceptReject.Visibility = ViewStates.Visible;
            btnDelete.Visibility       = ViewStates.Visible;
            btnAcceptReject.Click     -= BtnAcceptReject_Click;
            btnAcceptReject.Click     += BtnAcceptReject_Click;
            btnDelete.Click           -= BtnDelete_Click;
            btnDelete.Click           += BtnDelete_Click;

            btnLike           = FindViewById <ImageView>(Resource.Id.btnLike);
            btnLike.Click    += btnLike_Click;
            btnLike.Tag       = "0";
            txtLikeNumber     = FindViewById <TextView>(Resource.Id.txtLikeNumber);
            btnComment        = FindViewById <ImageView>(Resource.Id.btnComment);
            btnComment.Click += btnComment_Click;
            txtCommentNumber  = FindViewById <TextView>(Resource.Id.txtCommentNumber);
            btnShare          = FindViewById <ImageView>(Resource.Id.btnShare);
            btnShare.Click   += btnShare_Click;
            txtShareNumber    = FindViewById <TextView>(Resource.Id.txtShareNumber);

            CommentsLayout = FindViewById <FrameLayout>(Resource.Id.ResponseCommentsLayout);
            CommentsLayout.LayoutParameters.Height = (int)(Resources.DisplayMetrics.HeightPixels / 2);
            //txtHideComment = FindViewById<TextView>(Resource.Id.txtHideResponseComments);
            //txtHideComment.Click += txtHideComment_Click;
            CommentsFragment = new AdminResponseCommentsFragment();
            FragmentTransaction ftvideo = SupportFragmentManager.BeginTransaction();

            ftvideo.SetCustomAnimations(Resource.Animation.slide_up, Resource.Animation.slide_down);
            ftvideo.AddToBackStack(null);
            ftvideo.Add(CommentsLayout.Id, CommentsFragment, null).Hide(CommentsFragment).Commit();

            swipListener = new OnSwipeTouchListener(this);
            //DefaultDataMediaFactory = new DefaultDataSourceFactory(this, Util.GetUserAgent(this, AppSettings.ApplicationName), BandwidthMeter);

            Play();
        }