-1

How can I display the video in same view of ListView when I click the item of ListView like the image below?

enter image description here

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Ajay
  • 185
  • 3
  • 18

2 Answers2

0

On the ListView with the images you can add a setOnItemClickListener Then when onItemClick is called you can retrieve the URL of the video you are trying to play according to the position in the list like this

String videoUrl = videoUrls[position];

From here you can open a new Activity/Dialog; whichever you prefer to display the video and add the URL as an argument using something similar to this:

Bundle args = new Bundle();
args.putString("URL", videoUrl );

Then assign it using setArguments(args) to your Dialog if you have chosen a Dialog or using putExtra if you have chosen an Activity. From here you can get the video URL and display it.

Catalina
  • 1,954
  • 1
  • 17
  • 25
-1

Short answer: Fragments

on listitem click switch the listview to your player fragment.

BooNonMooN
  • 250
  • 3
  • 13