0

I want to display a video for the app I am developing. The problem that I am facing is, I have a Button being displayed from a template which is in JSON format. layout Onclick of this button I want my main.xml to be displayed. The contents of my XML are as follows.

<TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Play Video"
    />
<Button
    android:id="@+id/playvideoplayer"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="- PLAY Video -"
    />


<VideoView
    android:id="@+id/videoview"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    />

Could anyone please suggest how I could resolve this issue.

Ozair Kafray
  • 13,351
  • 8
  • 59
  • 84
lisa
  • 1
  • 5
  • you wanted to display a layout or you need to display video on play video click. can u please explain bit more ? – Jay Rathod Jan 06 '16 at 10:46
  • I need to display video on the click of the button "Play Video". You can view this button in the image that I have already mentioned. This button is getting displayed through the template. The template is as follows: { "id": "play_video", "name_kn": "ವೀಡಿಯೊ ಆಡಲು", "server_action": { "url": "vd.3gp", "method": "post", "close_after_save": true }, "type": "bt", "name": "Play Video", "mandatory": false }, – lisa Jan 06 '16 at 10:51
  • This `json` string gets converted to android xml template? – K Neeraj Lal Jan 06 '16 at 11:02
  • @lisa, your question is bit puzzling, Kindly rephrase it. – Pankaj Nimgade Jan 06 '16 at 11:35
  • onclick of the button I want to display the video. This button is being added in the template. I have already mentioned the template contents in the above contents. – lisa Jan 06 '16 at 11:39
  • http://stackoverflow.com/questions/3263736/playing-a-video-in-videoview-in-android – K Neeraj Lal Jan 06 '16 at 12:46
  • I am unable to understand how to connect from JSON to XML. I am successfully able to play the video independently in Android. But I do not understand how I can connect a button in JSON to XML page – lisa Jan 08 '16 at 10:03

0 Answers0