naresh
naresh

Reputation: 10402

android - How to play video in the image view

I want to play video in the image view. I mean, if user taps on the some portion of the image then the video will play. is it possible? please can anyone help me.

enter image description here

Upvotes: 2

Views: 7312

Answers (2)

Pavan
Pavan

Reputation: 5136

You can add ImageView and VideoView in RelativeLayout and set ImageView to invisible and VideoView to visible and vice-versa and you can play video on onClick.

Upvotes: 3

Sidharath
Sidharath

Reputation: 140

You can use framelayout having imageview on above and videoview at back. and when ever the user clicks on the imageview then you can hide the imageview and start the video using video view.

Upvotes: 0

Related Questions