As we all know, Google released the first Android P Developer Preview for developers. The build reveals forthcoming UI changes and features of the OS. Many features of Android P are now available for older Android versions as a standalone app. For example, Screenshot editor, Pixel launcher, and the new floating volume panel, etc. thanks to the developer community.
Google has changed the volume slider from horizontal position to vertical with floating volume panel. You can now implement this feature on phones run Android 4.1 and above. The app does not require root access on the phone. All you have to install the Android P Volume Slider app.
Developed by an XDA senior member yogi.306, the Android P Volume Slider app brings the floating volume panel to any phone runs Android Jellybean and above. This is a volume control widget and looks like Android P’s vertical volume slider.
The app is available on Play store [here], but it is a paid app. However, XDA members can download the APK file for free [here] and install it manually on the device.
How to use Android P Volume Slider? After installing the app, open it and grand permission for Do Not Disturb (Nougat and above), and System Overlay (as this app runs on top of any running apps it require this permission).
You can control the media volume from the notification panel or from app widget. To bring the app widget to your home screen, long press on the screen, tap widget and then select Android P Volume Slider Widget. (source – XDA)