L
L
Lord Drous2016-10-26 19:03:44
Java
Lord Drous, 2016-10-26 19:03:44

How can I make the radio play when the recycle view element is clicked?

the fact is that I need to write an application that will play 1 radio station, I made a standard one, I press play and the station plays ( air.radiorecord.ru:8102/sd90_320) , but I also need to do the same in the recycle view, so that when when pressed, it also started to play, as in the case of the button, I wrote the same code, but it does not play, all classes are in the photoab46bfaa80144281817f08f1bd29d450.pngaa3826a4420647bca891ea9b8481e638.png86fdeabb5026424fa374a6e724154c18.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Myvrenik, 2016-10-26
@gim0

In the adapter's onBindViewHolder method, add your own listener (on click listener) to each element and do what you need, in your case, play a specific radio corresponding to this element.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question