how to create Equalizer Button in Android? - 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.

Related

Transition animation based on continuous user input

I am experimenting with Transition animations following the Android Documentation here. I have a small POC where an ImageView and TextView are animated once the user clicks a button, as shown in the recording below.
This is working fine.
However, what I'm struggling to figure out next, is rather than triggering the animation with a click event, I would like the views to respond to continuous user input, such as dragging a Seekbar, and animate accordingly. So basically, if I drag the Seekbar let's say until mid point, then the views would perform only half of the animation and stop.
Any tips where should I look into, in order to achieve that?

How to create a "Waze like" progress button in Android:

I'm looking for a way to produce a button with progress functionality (the button is pressed at the end of the progress...) like in Waze, here in an example (the "Go now" button):
I found this solution:
Create rectangle border progress bar in android
And here is the result of the implementation made there:
But unfortunately this is not good enough (I can't changes the button corner radius to something round and the side progresses moving in a different speed the the top and the bottom progress).
From a check I made the Waze app creates the progress using a canvas and by painting paths on it. How can this be done?

Change android seekbar value without clicking direclty on the seekbar thumb

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.

How to get a seekbar after clicking button

I made an application on paint. I want to control the size of brush being used in paint using seek-bar.
In the menu(options) ,I have an option of changing brush size. So, by clicking on it, a seek bar should appear and I should be able to control that using save button (to set) and then use that value inside paint.
How do I do that?
Make seekbar visible inside xml or when you get its reference in onCreate method.
on button click make it visible.
Use latest values by registering OnSeekBarChangeListener on your Seekbar.

How to show Activity overlaying on another Activity?

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

Categories

Resources