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

Search This thread

TheFixItMan

Senior Member
Jul 8, 2012
7,844
4,052
London
brightness slider
http://xdaforums.com/showthread.php?t=2152370


other sliders decompile my systemui from this statusbar
http://xdaforums.com/showpost.php?p=46189065&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://xdaforums.com/showthread.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>
 
Last edited:
  • Like
Reactions: Himan Boro

Himan Boro

Senior Member
Jul 31, 2013
540
68
26
Guwahati
brightnless slider
http://xdaforums.com/showthread.php?t=2152370


other sliders decompile my systemui from this statusbar
http://xdaforums.com/showpost.php?p=46189065&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://xdaforums.com/showthread.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
 

TheFixItMan

Senior Member
Jul 8, 2012
7,844
4,052
London
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
 
Last edited:
  • Like
Reactions: Himan Boro

Himan Boro

Senior Member
Jul 31, 2013
540
68
26
Guwahati
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

Senior Member
Jul 31, 2013
540
68
26
Guwahati
It works bro..n i edit some pngs n Linear lines :)... how to remove that Square box..beside the volume slider.
 

Attachments

  • P.png
    P.png
    29.2 KB · Views: 281
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    brightness slider
    http://xdaforums.com/showthread.php?t=2152370


    other sliders decompile my systemui from this statusbar
    http://xdaforums.com/showpost.php?p=46189065&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://xdaforums.com/showthread.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>
    1
    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
    1
    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