Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //add linear layout and name it to mylinear
- //create component and name it to video video/*
- //paste this code just like in the tutorial
- final VideoView vd = new VideoView(MainActivity.this);
- vd.setLayoutParams(new RelativeLayout.LayoutParams(android.widget.RelativeLayout.LayoutParams.MATCH_PARENT, android.widget.RelativeLayout.LayoutParams.MATCH_PARENT)); mylinear.addView(vd);
- vd.setVideoURI(Uri.parse(path));
- vd.setMediaController(new MediaController(this));
- vd.requestFocus();
- vd.start();
- //note that i really work hard to provide this codes to
- //you so please support me by like π and subscribe π½οΈ
- //to my channel
- //my channel https://m.youtube.com/channel/UC85Bsb1LLPD977Zap2HSqpg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement