Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,772,395 Members 46,617 Now Online
XDA Developers Android and Mobile Development Forum

Q..How To Add Volume Slider And Other Sliders In StatusBar??

Tip us?
 
Himan Boro
Old
#1  
Himan Boro's Avatar
Senior Member - OP
Thanks Meter 62
Posts: 494
Join Date: Jul 2013
Location: Guwahati
Default Q..How To Add Volume Slider And Other Sliders In StatusBar??

Any Buddy Give A Guide
 
marcussmith2626
Old
(Last edited by marcussmith2626; 27th March 2014 at 05:11 AM.)
#2  
marcussmith2626's Avatar
Recognized Contributor
Thanks Meter 2365
Posts: 4,393
Join Date: Jul 2012
Location: London
brightness slider
http://forum.xda-developers.com/show....php?t=2152370


other sliders decompile my systemui from this statusbar
http://forum.xda-developers.com/show...65&postcount=2

copy all the smali from
smali\com\b16h22\statusbar to your status bar

add the pngs you want to put next to the slider
recompile the apk and then decompile the new apk to add the pngs to the public.xml
find the public values for the pngs and change the values in the smali with the public values (the smali isnt big so its easy to scroll through each one to find the old value - for example my MediaVolumeSlider.smali is 0x7f020093 so change that value with the value from your public.xml for the name of your png)

you will then need to add a 2nd panel to your status bar - there are various guides but I used
http://forum.xda-developers.com/show....php?t=2315342

you can then add all the sliders to the 2nd panel by adding it to that panel xml file
for example quickpanel_quick_settings_space.xml

Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <LinearLayout android:gravity="center" android:orientation="horizontal" android:background="@drawable/status_bar_background" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="3.0dip">
        <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:overScrollMode="ifContentScrolls">
            <LinearLayout android:gravity="center" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <TextView android:textColor="#ffffffff" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="System Brightness" android:shadowColor="#aa000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
                <com.lidroid.systemui.quickpanel.BrightnessSlider android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content">
                    <ImageView android:paddingLeft="3.0px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_brightness" />
                    <SeekBar android:tag="slider" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
                </com.lidroid.systemui.quickpanel.BrightnessSlider>
                <TextView android:textColor="#ffffffff" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Ringer Volume" android:shadowColor="#aa000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
                <com.b16h22.statusbar.RingerVolumeSlider android:layout_width="fill_parent" android:layout_height="wrap_content" />
                <TextView android:textColor="#ffffffff" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="System Volume" android:shadowColor="#aa000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
                <com.b16h22.statusbar.SystemVolumeSlider android:layout_width="fill_parent" android:layout_height="wrap_content" />
                <TextView android:textColor="#ffffffff" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Notification Volume" android:shadowColor="#aa000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
                <com.b16h22.statusbar.NotificationVolumeSlider android:layout_width="fill_parent" android:layout_height="wrap_content" />
                <TextView android:textColor="#ffffffff" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Media Volume" android:shadowColor="#aa000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
                <com.b16h22.statusbar.MediaVolumeSlider android:layout_width="fill_parent" android:layout_height="40.0dip" />
            </LinearLayout>
        </ScrollView>
    </LinearLayout>
</LinearLayout>

My Work And Threads For Galaxy Y GT-S5360


My PM is not a Question & Answer thread - Dont treat it as such!
The Following User Says Thank You to marcussmith2626 For This Useful Post: [ Click to Expand ]
 
Himan Boro
Old
#3  
Himan Boro's Avatar
Senior Member - OP
Thanks Meter 62
Posts: 494
Join Date: Jul 2013
Location: Guwahati
Quote:
Originally Posted by marcussmith2626 View Post
brightnless slider
http://forum.xda-developers.com/show....php?t=2152370


other sliders decompile my systemui from this statusbar
http://forum.xda-developers.com/show...65&postcount=2

copy all the smali from
smali\com\b16h22\statusbar to your status bar

you will then need to add a 2nd panel to your status bar - there are various guides but I used
http://forum.xda-developers.com/show....php?t=2315342

you can then add all the sliders to the 2nd panel by adding it to that panel xml file
for example quickpanel_quick_settings_space.xml

Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <LinearLayout android:gravity="center" android:orientation="horizontal" android:background="@drawable/status_bar_background" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="3.0dip">
        <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:overScrollMode="ifContentScrolls">
            <LinearLayout android:gravity="center" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <TextView android:textColor="#ffffffff" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="System Brightness" android:shadowColor="#aa000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
                <com.lidroid.systemui.quickpanel.BrightnessSlider android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content">
                    <ImageView android:paddingLeft="3.0px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_brightness" />
                    <SeekBar android:tag="slider" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
                </com.lidroid.systemui.quickpanel.BrightnessSlider>
                <TextView android:textColor="#ffffffff" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Ringer Volume" android:shadowColor="#aa000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
                <com.b16h22.statusbar.RingerVolumeSlider android:layout_width="fill_parent" android:layout_height="wrap_content" />
                <TextView android:textColor="#ffffffff" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="System Volume" android:shadowColor="#aa000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
                <com.b16h22.statusbar.SystemVolumeSlider android:layout_width="fill_parent" android:layout_height="wrap_content" />
                <TextView android:textColor="#ffffffff" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Notification Volume" android:shadowColor="#aa000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
                <com.b16h22.statusbar.NotificationVolumeSlider android:layout_width="fill_parent" android:layout_height="wrap_content" />
                <TextView android:textColor="#ffffffff" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Media Volume" android:shadowColor="#aa000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
                <com.b16h22.statusbar.MediaVolumeSlider android:layout_width="fill_parent" android:layout_height="40.0dip" />
            </LinearLayout>
        </ScrollView>
    </LinearLayout>
</LinearLayout>


Thnx+pressed....
can you tell me how to add only volume/media volume slider only...i wanna add below the brightness slider....or i will add volume slider by adding slideable mods to it
 
marcussmith2626
Old
(Last edited by marcussmith2626; 27th March 2014 at 05:24 AM.)
#4  
marcussmith2626's Avatar
Recognized Contributor
Thanks Meter 2365
Posts: 4,393
Join Date: Jul 2012
Location: London
Quote:
Originally Posted by Himan Boro View Post
Thnx+pressed....
can you tell me how to add only volume/media volume slider only...i wanna add below the brightness slider....or i will add volume slider by adding slideable mods to it
copy MediaVolumeSlider.smali MediaVolumeSlider$2.smali MediaVolumeSlider$1.smali
from smali\com\b16h22\statusbar to your status bar (to same location)

add the pngs you want to put next to the slider to res/drawable-ldpi

recompile the apk and then decompile the new apk to add the pngs to the public.xml
find the public values for the pngs and change the values in the smali with the public values (the smali isnt big so its easy to scroll through each one to find the old value - for example my MediaVolumeSlider.smali is 0x7f020093 so change that value with the value from your public.xml for the name of your png)

add the following to which ever xml you want where you want the slider to be

Code:
<LinearLayout android:gravity="center" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textColor="#ffffffff" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Media Volume" android:shadowColor="#aa000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
                <com.b16h22.statusbar.MediaVolumeSlider android:layout_width="fill_parent" android:layout_height="40.0dip" />
 </LinearLayout>
you can remove the textview if you dont want any text above the slider and you can remove the linearlayout if you are adding to an existing linearlayout or you can leave it as it is to give it its own dependinig on how you want it to look

My Work And Threads For Galaxy Y GT-S5360


My PM is not a Question & Answer thread - Dont treat it as such!
The Following User Says Thank You to marcussmith2626 For This Useful Post: [ Click to Expand ]
 
Himan Boro
Old
#5  
Himan Boro's Avatar
Senior Member - OP
Thanks Meter 62
Posts: 494
Join Date: Jul 2013
Location: Guwahati
Quote:
Originally Posted by marcussmith2626 View Post
copy MediaVolumeSlider.smali MediaVolumeSlider$2.smali MediaVolumeSlider$1.smali
from smali\com\b16h22\statusbar to your status bar (to same location)

add the pngs you want to put next to the slider to res/drawable-ldpi

recompile the apk and then decompile the new apk to add the pngs to the public.xml
find the public values for the pngs and change the values in the smali with the public values (the smali isnt big so its easy to scroll through each one to find the old value - for example my MediaVolumeSlider.smali is 0x7f020093 so change that value with the value from your public.xml for the name of your png)

add the following to which ever xml you want where you want the slider to be

Code:
<LinearLayout android:gravity="center" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textColor="#ffffffff" android:paddingLeft="3.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Media Volume" android:shadowColor="#aa000000" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" />
                <com.b16h22.statusbar.MediaVolumeSlider android:layout_width="fill_parent" android:layout_height="40.0dip" />
 </LinearLayout>
you can remove the textview if you dont want any text above the slider and you can remove the linearlayout if you are adding to an existing linearlayout or you can leave it as it is to give it its own dependinig on how you want it to look
yes..i tryd d same method by myself ..all wer corect excpt the public.xml so i got fc
 
Himan Boro
Old
(Last edited by Himan Boro; 27th March 2014 at 02:12 PM.)
#6  
Himan Boro's Avatar
Senior Member - OP
Thanks Meter 62
Posts: 494
Join Date: Jul 2013
Location: Guwahati
It works bro..n i edit some pngs n Linear lines ... how to remove that Square box..beside the volume slider.
Attached Thumbnails
Click image for larger version

Name:	P.png
Views:	50
Size:	29.2 KB
ID:	2653253  
 
marcussmith2626
Old
(Last edited by marcussmith2626; 27th March 2014 at 03:34 PM.)
#7  
marcussmith2626's Avatar
Recognized Contributor
Thanks Meter 2365
Posts: 4,393
Join Date: Jul 2012
Location: London
Quote:
Originally Posted by Himan Boro View Post
It works bro..n i edit some pngs n Linear lines ... how to remove that Square box..beside the volume slider.
its part of the smali I think so best to ask b16h22

it just locks the slider if its ticked so you cant accidently change it

My Work And Threads For Galaxy Y GT-S5360


My PM is not a Question & Answer thread - Dont treat it as such!
The Following User Says Thank You to marcussmith2626 For This Useful Post: [ Click to Expand ]
 
Himan Boro
Old
#8  
Himan Boro's Avatar
Senior Member - OP
Thanks Meter 62
Posts: 494
Join Date: Jul 2013
Location: Guwahati
Quote:
Originally Posted by marcussmith2626 View Post
its part of the smali I think so best to ask b16h22

it just locks the slider if its ticked so you cant accidently change it
ok..bro let it be like tht only Thanx again

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes