****I am developing Video Player and i am using Media_controller here is the link below****
但是在这个我可见的next和prev按钮,当我打电话设置Prev Next Listeners Method然后它仍然无法工作next和prev按钮代码如下所示
mNextButton = (ImageView) v.findViewById(R.id.next);
if (mNextButton != null && !mFromXml && !mListenersSet) {
mNextButton.setVisibility(View.VISIBLE);
setPrevNextListeners(mNextListener,null);
}
mPrevButton = (ImageView) v.findViewById(R.id.prev);
if (mPrevButton != null && !mFromXml && !mListenersSet) {
mPrevButton.setVisibility(View.VISIBLE);
setPrevNextListeners(mPrevListener,null);
}
答案 0 :(得分:1)
像这样使用......也许可以帮助你
mediacontroller.setPrevNextListeners(new View.OnClickListener() {
@Override
public void onClick(View v) {
// next button clicked
}
}, new View.OnClickListener() {
@Override
public void onClick(View v) {
// prev button clicked
}
});
mediacontroller.show(10000);