Unable to launch player from recyclerView
I am launching AudioWife when user click on item, when i click on item nothing happens just recyclerview stops scrolling for a while. I am doing like this in onBindViewHolder: AudioWife.getInstance().init(context, Uri.parse(consersation.getListMessageData().get(position).text)) .useDefaultUi(mPlayerContainer, getLayoutInflater()); Please help me to resolve this issue.....
copy all the elements from ax_player.xml to your recycler view item's xml.
then find each of them by id like other elements in your ViewHolder.
then set each of them for the AudioWife in the onBindViewHolder() like this:
AudioWife audioWife = new AudioWife();
myAudioWife.init(context, uri)
.setPlayView(holder.mPlayerPlayBtn)
.setPauseView(holder.mPlayerPauseBtn)
.setSeekBar(holder.mPlayerSeekBar)
.setTotalTimeView(holder.mTotalTimeTextView);
i had the same problem but this fixed it.
Awesome! This is a nice library, it shouln't be broken as it is right now 🤔
After applying the patch of https://github.com/jaydeepw/audio-wife/pull/11 and @emadbagheri96's solution, everything worked perfect