Reputation: 249
I want to create a listview which has the path of my mp4 files and when i click it, it will play the video in my videoview which is located on the upper part of the listview. I've tried searching for it but i can't find any tutorial. The layout is like in the youtube app the video is playing on the upper part and underneath are the list of videos. I only seen a tutorial where you will use a SURFACEVIEW but it displays the video on the whole screen. Can anyone help me please? Thank you so much!
Upvotes: 1
Views: 4325
Reputation: 931
I think you are trying to achive something like these Dragable video with list
Hope it will be helpful
Upvotes: 0
Reputation: 5175
You cant use videoview inside listview cause videoview extends surfaceview internally. Surfaceview cannot be scrolled reason refere this
2 approaches i can suggest
1) Use textureview instead of videoview
2) Hide the surfaceview when you scroll Like replace videoview with the imageview (showing thumbnail) when you scroll.
Upvotes: 4
Reputation: 3705
SurfaceView is a View and can be resized in any parent ViewGroup like other Views.It does not have to be fullscreen. Please consider using it in a layout.
Upvotes: 1