2

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

naresh
  • 10,332
  • 25
  • 81
  • 124

2 Answers2

3

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.

Muktadir Khan
  • 148
  • 3
  • 17
Pavan
  • 5,016
  • 1
  • 26
  • 30
  • But How do we know this image having the video and How do we perform click operation? I mean, I want to play the video if we click on the some portion of the text. – naresh Nov 15 '13 at 10:38
  • check this link hope it will help you http://stackoverflow.com/questions/12892270/how-to-play-video-in-android-on-click – Pavan Nov 15 '13 at 10:41
0

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.

Sidharath
  • 130
  • 1
  • 7