本文介绍了MediaControl seekbar问题android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的Android应用程序中,我正在使用MediaController的MediaController搜寻栏. 我想知道用户是否搜索到大于缓冲位置的位置,我需要显示一个对话框,然后在搜索完成时关闭对话. 请让我知道是否可以解决此问题.
In my Android application I am facing issue with seekbar of MediaController that I am using for Videoview. I would like to know if the user seeks to a position greater than the buffered position,I need to show a dialog and then dismiss the dialogue on seek completed. Please let me know if I can have this solved.
推荐答案mSeekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onStopTrackingTouch(SeekBar arg0) { // you can check for the current buffer state and where the use seek using mSeekBar.getProgress() and then open up a dialog. if(condition to match buffering and seek position) openDialog(); } @Override public void onStartTrackingTouch(SeekBar arg0) { } @Override public void onProgressChanged(SeekBar arg0, int progress, boolean arg2) { } }); ... public void openDialog() { ... // check for buffer level to match your seek position // when it meets the codition,cancel the dialog. ... }
更多推荐
MediaControl seekbar问题android
发布评论