How to Hide Video view's Seekbar or Progressbar in android

前端 未结 4 1483
走了就别回头了
走了就别回头了 2021-01-19 00:50

i am doing live streaming and play video in video view. i want to hide default progress bar of video view . so i kindly request for my problem if anybody ha

4条回答
  •  再見小時候
    2021-01-19 01:38

    I was able to get the SeekBar hidden with the help of following :

     public void hidingSeekBar() {
    
            final int topContainerId1 = getResources().getIdentifier("mediacontroller_progress", "id", "android");
            final SeekBar seekbar = (SeekBar) mediaController.findViewById(topContainerId1);
            seekbar.setVisibility(View.INVISIBLE);
    
            final int topContainerId2 = getResources().getIdentifier("time", "id", "android");
            final TextView mEndTime = (TextView) mediaController.findViewById(topContainerId2);
            mEndTime.setVisibility(View.INVISIBLE);
    
    
            final int topContainerId3 = getResources().getIdentifier("time_current", "id", "android");
            final TextView mCurrentTime = (TextView) mediaController.findViewById(topContainerId3);
            mCurrentTime.setVisibility(View.INVISIBLE);
            // mEndTime, mCurrentTime;
        }
    

    P.S: I got the reference to the MediaController controls here.

提交回复
热议问题