Posts

Showing posts from September, 2020

Fullscreen button on VideoView

Image
This example shows how to add a fullscreen button on VideoView in Sketchware android project. In the project there will be a button to pick video files and a LinearLayout for the VideoView. On picking the video file, it will play in VideoView and there will be a fullscreen button on the MediaController of the VideoView, clicking on which the video will become fullscreen. 1. In main.xml add a Button button1, a TextView textview1, and a LinearLayout linear2. For linear2 set padding 0, height 300, and gravity CENTER_HORIZONTAL. 2. In View manager set orientation to Both landscape and portrait.
3. Create a FilePicker component picker with mime type video/*.
4. Create a List String list, a String path, and a boolean isFullscreen. 5. Create a More block declare. Put following code in it.
}RelativeLayout rl;VideoView videoView;MediaController mc;FrameLayout fm;private int mOriginalSystemUiVisibility;{6. In onCreate event use add source directly block and put following code in it.rl = new RelativeL…