MediaControl seekbar问题android

编程入门 行业动态 更新时间:2024-10-24 12:28:30
本文介绍了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

本文发布于:2023-10-08 02:44:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1471280.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:MediaControl   seekbar   android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!