How to show Activity overlaying on another Activity? - android

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);

Related

Removing elements from within the YouTubePlayerView in Android

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.

Audio progress bar for Android

I have an audio program that I would like to add an audio progress bar with some kind of button, so that a user can grab the button to navigate through the audio forward or backward.
Is there any kind of standard component that does that? Or how can I make a custom one?
You can use SeekBar.
To position and seek the audio, use MediaPlayer's getCurrentPosition(), getDuration() and seekTo(int).

Disable user controls in an Android VideoView object

I'm working on an app that plays a video. I cannot find a way to disable the user video controls (Play, pause, go to 1:23, etc...)
How do I remove the user controls from that object? Ideally the bottom bar of controls will not even show up.
VideoView doesn't have controls built in so I'm assuming you have a MediaController set up in your code, which has the controls that appear when tapping the screen and then go away. If that's the case you can remove it and your problem should be solved.

Android "Tooltip"

The current Android YouTube application provides helpful hints for navigating the user interface. For example: the first time the user switches between tabs while a video is playing, a small "tooltip" with an arrow pops up and says "You can also switch between tabs by swiping left and right." or something to that effect. Is there a way to mimic the look and functionality of this tooltip?
The best way I could think of doing that is having something in a preferences file and when the user triggers a certain event (pressing a tab in Youtube rather than swiping) it brings up a custom view or even a Toast message. Then, after the tooltip is triggered, set the specific tag in the preferences file as triggered.

how to create Equalizer Button in Android?

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.

Categories

Resources