fixed grammar and spelling

This commit is contained in:
Niels
2024-05-07 11:26:28 +02:00
parent 53cf5cd19b
commit 620c36c35a

View File

@@ -1,10 +1,10 @@
# VideoView
We wanted to show the different exercises in a video that anybody could replicate. For this we didn't want to implement a youtube function we wanted to have our own videos so that we don't rely on youtube. Ti start we need an emoty activity file you can create one in the android studio IDE. Then you need to head to the XML file you just created and the go to widgets and the add the VideoView element
We wanted to show the various exercises in a video that everyone could replicate. We did not want to implement a YouTube function because we wanted to have our own videos rather than relying on YouTube. To begin, we need an empty activity file, which you can create using the Android Studio IDE. Then, navigate to the XML file you just created and the go-to widgets, and add the VideoView element.
![VideoView](VideoViewWidget.png)
If you drag that in to your activity you can edit the layout of it but it will not function directly. To Let it play videos we need to write a java code. First start by coding what you want to view.
If you drag that into your activity, you can change the layout, but it will not function directly. To make it play videos, we need to write some Java code first.
```java
VideoView videoView = findViewById(R.id.videoView);
videoView.setVideoURI(Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.videofile));
@@ -20,4 +20,4 @@ replace the video file with the name of the video. Then you need to code the med
}
});`
```
Since we have short videos we will have a auto replay function if you want it can go to a completion screen after the video ended.
Because we have short videos, we will have an auto replay function.