I am using YoutubePlayerview in android applicaiton, which is almost working fine,But now my need is get seekbar value of youtubeplayerview, Mean if any user drag seek bar , i want to show that value on textview parallelly , is that any way to achieve it
Try this:
youPlayer.getCurrentTimeMillis();
Related
I have an android seekbar that appears on the screen when a user touches a button.
How can I start tracking user touch to move the seekbar immediately after it appears?
To be more clear, essentially I want the user to be able to move the seekbar thumb/progress without clicking directly on it.
Seekbar extends ProgressBar, so just call setProgress on your SeekBar to update it.
See this for reference.
My YouTube video shows an overflow menu, full screen, open in YouTube buttons from within the YouTubePlayerView or the YouTubePlayerFragment.
Is there any way to remove those items? I can't find anything in the docs.
Thanks.
Add the style YouTubePlayer.PlayerStyle.CHROMELESS in initialization to completely remove all available controls.
In onInitializationSuccess add ytPlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.CHROMELESS);.
Check here for more details.
Edit : You can add your own controls using either a DialogFragment or Dialog on top of the YoutubePlayer. This will allow you to control playback completely using your own buttons and seekbar. And it does the trick of removing Youtube App Button from player.
Yes You can disable full screen from default player,You need to just use below code with your player object.
//To disable full screen mode.
player.setShowFullscreenButton(false);
Use above line to hide full screen button from your default youtube player.Hope this will work for you.
how develop this type of layout?
if song playing then it show otherwise not..
which should display over master/Detail.... as well update progress of playing song.
i want it for Android 4.0 or above for both portrait & landscape
Please Help me..
In my opinion you should use FrameLayout. You can declare NavigationDrawer with ListView as the first layout (NavigationDrawer reference) and then a "steering" of music player layout with progressbar as the second. The progress bar can be achieved with a SeekBar.
You can show/hide the second layout programmatically with setVisibility(int visibility)
Here you have a nice reference and tutorial.
I want to show a volume bar (SeekBar) when a speaker button is pressed. Changing the whole Activity just for a SeekBar might not be a good decision.
I think overlaying that SeekBar would be the best solution. (But how?)
How would you solve this problem?
You could use your own customized dialog and automatically dismiss it if the user hasn't touched the screen after a short while, but I would like to ask exactly why you need it.
The reason: not all Android devices even have volume buttons.
If you wish, you can easily just set the volume control to be MEDIA instead of the ringtone volume, so that if the user accesses the volume , it will show the control of the MEDIA . Here's how you do it:
setVolumeControlStream(AudioManager.STREAM_MUSIC);
I think you should use a custom Dialog with a SeekBar set as content.
As a side note, remember to get rid of the title requesting the right feature to your window:
getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
I am new to android i wish to create a button like a Equalizer Button. At the time of track the button i need to do some work.Can any one help me
I think you're looking for the SeekBar. That's a View derived from the ProgressBar, but with a "thumb" so it looks like a slider control. A user can use the thumb to move left or right from min to max. You don't have to use it like a progress bar to track the progress of something, and can receive notifications that the user is touching and moving the thumb using a SeekBar.OnSeekBarChangeListener.