When you are in an Instagram story, and you decide to raise or lower the volume, this custom bar appears
Instead, the normal volume bar looks like this
I've researched ways to do it, but haven't found any.
How do I make this effect in Android Studio?
PD: I want to make this effect only when a person is using my application NOT to change the volume bar on the Android system
Use Key Event to find control of volume up and down button like this.
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP:
return true;
case KeyEvent.KEYCODE_VOLUME_DOWN:
return true;
default:
break;
}
return super.onKeyDown(keyCode, event);
}
And then create a custom seek bar and control the seek bar progress with the button control. Hope it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With