MediaPlayer,RecyclerAdapter显示了一些播放按钮

时间:2019-02-09 11:53:20

标签: android kotlin android-recyclerview recycler-adapter recyclerview-layout

“回收”视图应该显示一些歌曲和一个按钮播放,但是相反,它显示了一些歌曲和一些按钮播放,似乎我做错了。

我以 Twilio.Video.createLocalTracks({ audio: true, video: { width: 300 } }).then(function(localTracks) { return Twilio.Video.connect('{!! $accessToken !!}', { name: '{{ $roomName }}', tracks: localTracks, video: { width: 300 } }); }).then(function(room) { console.log('Successfully joined a Room: ', room.name); room.participants.forEach(participantConnected); var previewContainer = document.getElementById(room.localParticipant.sid); if (!previewContainer || !previewContainer.querySelector('video')) { participantConnected(room.localParticipant); } room.on('participantConnected', function(participant) { console.log("Joining: '" + participant.identity + "'"); participantConnected(participant); }); room.on('participantDisconnected', function(participant) { console.log(participant); console.log("Disconnected: '" + participant.identity + "'"); participantDisconnected(participant,room); }); }); 布局初始化了songTitle TextViewtestButtonPlay button

如果我在RecyclerView的活动中初始化sound_template.xml,则会收到错误消息:

  

java.lang.NullPointerException:尝试调用虚拟方法   '无效   android.widget.ImageButton.setOnClickListener(android.view.View $ OnClickListener)'   在空对象引用上

testButtonPlay

0 个答案:

没有答案