Q: Recorded video not playing in Redmi Note 4. and not playing in full screen in any device What I am doing-
I am recording a video in a fragment and playing the video in different fragment using videoUri in videoView.
xml code:
       <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/videoPreview"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_constraintTop_toTopOf="parent" >

            <VideoView
                android:id="@+id/videoView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"/>

            <ImageView
                android:id="@+id/play_video_iv"
                android:layout_width="80dp"
                android:layout_height="80dp"
                android:src="@drawable/ic_play_circle_filled_black_24dp"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                android:clickable="true"
                app:layout_constraintRight_toRightOf="parent"
                android:focusable="true" />
        </androidx.constraintlayout.widget.ConstraintLayout>

play_video_iv is a preview button. On clicking this button video should start playing in full screen.
java(Fragment) code:
preview.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                videoView.setPadding(0,0,0, 1);
                videoView.setPaddingRelative(0,0,0,0);

                videoView.setVideoURI(videoUri);
                videoView.setMediaController(new MediaController(getContext()));

                videoView.requestFocus();
                videoView.start();

                if(!videoView.isPlaying()){
                    Log.d(TAG, "onClick: "+"video is not playing.");
                    videoView.setMediaController(new MediaController(getContext()));
                    videoView.requestFocus();
                    videoView.start();
                    preview.setVisibility(View.GONE);
                }

                preview.setVisibility(View.GONE);

                videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
                    @Override
                    public void onCompletion(MediaPlayer mediaPlayer) {
                        preview.setVisibility(View.VISIBLE);
                        videoView.pause();

                    }
                });

            }
        });

issue:
1. Video is not playing in full screen.
2. Video is not playing  in Redmi note 4.
Can someone tell me what I am doing wrong and what is possible solution?
Thanks,
