Cannot Remove Battery Percentage - Galaxy S 5 Q&A, Help & Troubleshooting

Hello everyone!
I have been searching about this matter for a few days now but can't seem to find a solution for it.
I am running a Samsung Galaxy S5 (SCL23)
I have a modified stock version of Android Lollipop Touchwiz 5.0.
I have already Deodexed the whole ROM.
I have successfully decompiled the whole SystemUi.apk and recompiled it without any errors.
I can change the color of the battery percentage text in the colors.xml (<color name="battery_text_color">#ffff0000</color>)
It works flawless!
But what i cannot seem to do is to remove the battery percentage completely.
I have tried adding: android:visibility="gone"
In the files: msim_system_icons.xml & system_icons.xml
Code:
<TextView android:textSize="@dimen/battery_text_size" android:textColor="@color/battery_text_color" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:alpha="0.74" android:importantForAccessibility="no" android:fontFamily="sans-serif" android:layout_marginStart="@dimen/battery_text_marginStart" android:visibility="gone" />
But without any effect at all...
It just boots normally.
I have tried removing the "<TextView />" line completely.
But that just results in a SystemUI has stopped working on boot.
Is there anything i'm missing here?
Appreciating any kind of help!
Here is a full copy of msim_system_icons.xml & system_icons.xml
msim_system_icons.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:id="@id/system_icons" android:layout_width="wrap_content" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="2.0dip">
<include android:id="@id/msim_signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="2.0dip" android:layout_marginEnd="@dimen/rssi_battery_gap" layout="@layout/msim_signal_cluster_view" />
<TextView android:textSize="@dimen/battery_text_size" android:textColor="@color/battery_text_color" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAccessibility="no" android:fontFamily="sans-serif" android:layout_marginStart="@dimen/battery_text_marginStart" android:visibility="gone" />
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="@dimen/battery_icon_width" android:layout_height="@dimen/battery_icon_height" android:layout_marginBottom="@dimen/battery_icon_bottom_margin" android:layout_marginStart="3.0dip" />
</LinearLayout>
</LinearLayout>
system_icons.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:id="@id/system_icons" android:layout_width="wrap_content" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:alpha="0.74" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="2.0dip">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="2.0dip" android:layout_marginEnd="@dimen/rssi_battery_gap" layout="@layout/signal_cluster_view" />
<TextView android:textSize="@dimen/battery_text_size" android:textColor="@color/battery_text_color" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:alpha="0.74" android:importantForAccessibility="no" android:fontFamily="sans-serif" android:layout_marginStart="@dimen/battery_text_marginStart" android:visibility="gone" />
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="@dimen/battery_icon_width" android:layout_height="@dimen/battery_icon_height" android:layout_marginBottom="@dimen/battery_icon_bottom_margin" android:alpha="0.74" android:layout_marginStart="3.0dip" />
</LinearLayout>
</LinearLayout>

In the latest LP firmware, there is a toggle switch in battery settings to remove the % from the status bar

*Detection* said:
In the latest LP firmware, there is a toggle switch in battery settings to remove the % from the status bar
Click to expand...
Click to collapse
Unfortunately that is not possible, since the latest update for SCL23 is LP 5.0 only.
Is it possible to add this switch by myself instead?
My idea is to locate the files that is controlling this number and just edit it away.
I'm still sitting here and fiddling with it, trying different things.
If anyone want some files from me just ask and i will post them.
I would really love to fix this, any other ideas?

It is LP 5.0 with the switch
I was thinking you could figure out what that switch changes, and add the code yourself

*Detection* said:
It is LP 5.0 with the switch
I was thinking you could figure out what that switch changes, and add the code yourself
Click to expand...
Click to collapse
I will try and look at a different ROM SystemUi and see if i can make any sense out of it.
Or maybe i will have to install The same ROM i have in a Emulator on my computer for quicker modding.
I just changed:
Dimens.xml
Code:
<dimen name="battery_text_marginStart">0.0dip</dimen>
<dimen name="battery_text_size">0.0dip</dimen>
Rebuilded.
Replaced the SystemUI, with 0644 permissions.
Also wiped Dalvik Cache & Cache.
And fixed permissions.
Restarted
To see if it will go away, i will see if it works tomorrow morning.
Its upgrading all the apps now and I've got to sleep.

Yay! That fixed it, the text is gone!

Related

slidingdrawer with fullscreen handle, how?, EDITED, new question?

hello, I want to have to views, both fullscreen and i want the one view to be under the other, you should only be able to scroll from the upper to the other and not from bottom and up so I thought the a slidingDrawer would work!
my xml i like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<SlidingDrawer xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:handle="@+id/background"
android:content="@+id/all_apps"
android:allowSingleTap="false" >
<LinearLayout
android:id="@id/background"
android:orientation="vertical"
android:gravity="center_horizontal|bottom"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1.0"
android:background="@color/background">
<TextView android:id="@+id/time"
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="07:59"
android:textColor="@color/text"
android:textSize="@dimen/time_text"
android:maxLines="1"
android:layout_marginTop="65dip"
android:layout_marginBottom="-20dip"
android:visibility="invisible" />
<TextView android:id="@+id/desc"
android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="VAKNA"
android:textColor="@color/text"
android:textSize="@dimen/desc_text"
android:maxLines="1"
android:ellipsize="end"
android:layout_marginTop="-60dip"
android:layout_marginBottom="-20dip"
android:visibility="invisible" />
<LinearLayout
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:gravity="center"
>
<ImageButton android:id="@+id/snooze"
android:background="@drawable/clock_selector"
android:layout_height="@dimen/icon_size"
android:layout_width="@dimen/icon_size"
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>
<LinearLayout android:id="@id/all_apps"
android:layout_height="fill_parent"
android:layout_width="fill_parent" />
</SlidingDrawer>
what wrong? I can see the handle in fullscreen but cant scroll down to the bottom view....
EDIT: did just found out that the drawerhandler always shows so theres no space for the content field to show.... then I need to set the topOffset="-screenheight" but how do I do this because the screensizes is not always the same and cant find out how to make this in code instead of in xml....
someone that knows how to do this??

Layout Help

Hi,
I hope anybody can help my with this layout.
have a Look at the attachment.
I realy tried lon time with diffrent layouttypes (tbale relative etc.) but I don't get it....
The Buttons won't go down, layout gravity bottom nothing happens
here is the xml code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/background" android:layout_gravity="bottom" android:orientation="vertical" android:baselineAligned="false">
<ImageView android:id="@+id/ImageView01" android:layout_width="fill_parent" android:background="@drawable/logo" android:layout_height="wrap_content"></ImageView>
<LinearLayout android:layout_gravity="center_vertical" android:id="@+id/LinearLayout02" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"><Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Button02" android:layout_gravity="right" android:text="@+id/Button02"></Button>
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Button03" android:text="@+id/Button03"></Button>
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Button01" android:layout_gravity="bottom" android:text="@+id/Button01"></Button>
</LinearLayout>
</LinearLayout>
Plz help me!
Thanks

2 Questions about status bar...

1. I have SGYD GT-S6102 and making the clock in the middle is really hard since the phone is dual-sim. Does anyone know how to do it on a dual-sim version phone? I found many threads to help, but none of them worked.
2. I need to remove the number "1" on the status bar which shows that you are currently using sim 1 (number 2 for sim 2). Is there a way I can remove it? (Pic added)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Regards,
RoyaLKurTx3
change the clocks gravity to center in status_bar.xml
you may have to give it its own layout to stop it overlapping other icons like
delete
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" androidaddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
under the line that starts and ends
<com.android.systemui.statusbar.StatusBarView............... xmlns:android="http://schemas.android.com/apk/res/android">
place the following
<LinearLayout android:gravity="center" androidrientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textSize="26.5dip" android:textStyle="bold" android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="false" android:layout_weight="1.0" />
</LinearLayout>
change the coding to your taste
marcussmith2626 said:
change the clocks gravity to center in status_bar.xml
you may have to give it its own layout to stop it overlapping other icons like
delete
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" androidaddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
under the line that starts and ends
<com.android.systemui.statusbar.StatusBarView............... xmlns:android="http://schemas.android.com/apk/res/android">
place the following
<LinearLayout android:gravity="center" androidrientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textSize="26.5dip" android:textStyle="bold" android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="false" android:layout_weight="1.0" />
</LinearLayout>
change the coding to your taste
Click to expand...
Click to collapse
Yep it worked Just 2 problems with it, other icons are getting on it, and when something pops up like a text message, it doesnt get hidden like all icons, it stays there.
And for the number 1 icon, I made it as a 1x1 transparent image and it is hidden but there is a blank space which is ugly and unneeded.
Is there a way to continue other icons from it's place?
Regards,
RoyaLKurTx3
Not come across that problem with a notification overlay not going away
You may have to edit your status_bar.xml layouts and define the notification area separately
if you look on my statusbar thread (link in my signature) download say the black Transparent Patch & decompile that SystemUI.apk to compare with your SystemUI.apk as that has center clock I think from memory
just play around with the layouts for notifications - can't really help you anymore
the gap will be there as it's still displaying your blank image - I don't know what code needs to be removed
Sorry, double post.
marcussmith2626 said:
Not come across that problem with a notification overlay not going away
You may have to edit your status_bar.xml layouts and define the notification area separately
if you look on my statusbar thread (link in my signature) download say the black Transparent Patch & decompile that SystemUI.apk to compare with your SystemUI.apk as that has center clock I think from memory
just play around with the layouts for notifications - can't really help you anymore
the gap will be there as it's still displaying your blank image - I don't know what code needs to be removed
Click to expand...
Click to collapse
When I copy something from ur status_bar of BlackPatchS3 to my status_bar, I get FC. Can you suggest what I should change?
My status_bar.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="#ff000000" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textSize="16.0dip" android:textStyle="bold" android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="false" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
<com.android.systemui.statusbar.BatteryText android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="center_vertical" android:orientation="horizontal" android:paddingRight="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageSwitcher android:id="@id/tickerIcon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="8.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
</ImageSwitcher>
<com.android.systemui.statusbar.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</com.android.systemui.statusbar.TickerView>
</LinearLayout>
<com.android.systemui.statusbar.DateView android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:id="@id/date" android:background="#ff000000" android:paddingLeft="6.0px" android:paddingRight="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</com.android.systemui.statusbar.StatusBarView>
BlackPatchS3 status_bar.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="@drawable/statusbar_backgrounddj" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:textColor="#ff09a9ec" android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textSize="26.5dip" android:textStyle="bold" android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="false" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.IconMerger android:gravity="left" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="3.0dip" android:paddingRight="70.0px" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout android:gravity="right" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
<com.android.systemui.statusbar.SignalText android:textSize="26.5dip" android:textStyle="bold" android:gravity="center_vertical" android:orientation="horizontal" android:paddingRight="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<com.android.systemui.statusbar.BatteryText android:textSize="16.5dip" android:typeface="serif" android:textStyle="bold" android:gravity="center_vertical" android:orientation="horizontal" android:paddingRight="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:background="@drawable/statusbar_dj" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageSwitcher android:id="@id/tickerIcon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="8.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
</ImageSwitcher>
<com.android.systemui.statusbar.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker" android:textSize="15.0dip" android:textColor="#ffffffff" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker" android:textSize="15.0dip" android:textColor="#ffffffff" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</com.android.systemui.statusbar.TickerView>
</LinearLayout>
<com.android.systemui.statusbar.DateView android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textColor="#0033b5e5" android:gravity="left|center" android:id="@id/date" android:background="#00000000" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:layout_width="0.0dip" android:layout_height="fill_parent" android:singleLine="true" />
<com.android.systemui.statusbar.BatteryBar android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:gravity="center_vertical" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</com.android.systemui.statusbar.StatusBarView>
Not really you will just have to play around
remember if you copy anything with an @iD or @drawable value it must have the same value in values.xml & the corresponding png in the drawables folder
Anything starting com needs the corresponding small & xml files
You just need to trial & error
marcussmith2626 said:
Not really you will just have to play around
remember if you copy anything with an @iD or @drawable value it must have the same value in values.xml & the corresponding png in the drawables folder
Anything starting com needs the corresponding small & xml files
You just need to trial & error
Click to expand...
Click to collapse
didnt succeed :/
marcussmith2626 said:
Not really you will just have to play around
remember if you copy anything with an @iD or @drawable value it must have the same value in values.xml & the corresponding png in the drawables folder
Anything starting com needs the corresponding small & xml files
You just need to trial & error
Click to expand...
Click to collapse
cmon please dude ._. i suck at editing :/
RoyaLKurTx3 said:
cmon please dude ._. i suck at editing :/
Click to expand...
Click to collapse
With respect I'm not here to do it all for you - iv told you how to do alot of things not just in this thread - iv other things to do in my life - if you can't work out be happy with what you got
marcussmith2626 said:
With respect I'm not here to do it all for you - iv told you how to do alot of things not just in this thread - iv other things to do in my life - if you can't work out be happy with what you got
Click to expand...
Click to collapse
hehe np but thanks for everything
Tanks for all the help, i decided to buy and S4 mini. much better.

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

Any Buddy Give A Guide
brightness slider
http://forum.xda-developers.com/showthread.php?t=2152370
other sliders decompile my systemui from this statusbar
http://forum.xda-developers.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://forum.xda-developers.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>
marcussmith2626 said:
brightnless slider
http://forum.xda-developers.com/showthread.php?t=2152370
other sliders decompile my systemui from this statusbar
http://forum.xda-developers.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://forum.xda-developers.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>
Click to expand...
Click to collapse
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
Himan Boro said:
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
Click to expand...
Click to collapse
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
marcussmith2626 said:
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
Click to expand...
Click to collapse
yes..i tryd d same method by myself ..all wer corect excpt the public.xml so i got fc
It works bro..n i edit some pngs n Linear lines ... how to remove that Square box..beside the volume slider.
Himan Boro said:
It works bro..n i edit some pngs n Linear lines ... how to remove that Square box..beside the volume slider.
Click to expand...
Click to collapse
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
marcussmith2626 said:
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
Click to expand...
Click to collapse
ok..bro let it be like tht only Thanx again

[Guide] Center and Right Clock Mods for Pie

There has been some confusion about the ability to have a true center clock for Pie due to the notch made for Pixel 3 XL. This guide will show you how to center the clock and also move it to the right assuming you know how to decompile and recompile your SystemUIGoogle.apk. Find the statusbar.xml in the res/layout folder.
Center Clock
Find the code for the clock:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:paddingStart="@dimen/status_bar_left_clock_starting_padding" android:paddingEnd="@dimen/status_bar_left_clock_end_padding" />
Copy/Cut it and move it to just under this code which is located near the top:
Code:
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
Remove the padding from the clock's code. Change the android:gravity from start|center to just center and change the android:layout_width from wrap_content to fill_parent. The resulting clock code will read like this:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />
The entire statusbar.xml will now look like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@id/status_bar" android:background="@drawable/system_bar_background" android:focusable="false" android:descendantFocusability="afterDescendants" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_height" android:accessibilityPaneTitle="@string/status_bar"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />
<ImageView android:id="@id/notification_lights_out" android:paddingBottom="2.0dip" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:paddingStart="@dimen/status_bar_padding_start" />
<LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="@dimen/status_bar_padding_start" android:paddingEnd="@dimen/status_bar_padding_end">
<ViewStub android:id="@id/operator_name" android:layout="@layout/operator_name" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<FrameLayout android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<include layout="@layout/heads_up_status_bar_layout" />
<LinearLayout android:id="@id/status_bar_left_side" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.android.systemui.statusbar.AlphaOptimizedFrameLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:clipChildren="false" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
</FrameLayout>
<android.widget.Space android:gravity="center" android:id="@id/cutout_space_view" android:layout_width="0.0dip" android:layout_height="fill_parent" /> <com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="end|center" android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<include layout="@layout/system_icons" /> </com.android.keyguard.AlphaOptimizedLinearLayout>
</LinearLayout>
<ViewStub android:id="@id/emergency_cryptkeeper_text" android:layout="@layout/emergency_cryptkeeper_text" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
Right Clock
Find the code:
Code:
<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="end|center" android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
and change it to this:
Code:
<com.android.keyguard.AlphaOptimizedLinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
Just under that code will be this:
<include layout="@layout/system_icons" />
Immediately under that code add this:
Code:
<android.widget.Space android:gravity="center" android:id="@id/cutout_space_view" android:layout_width="0.0dip" android:layout_height="fill_parent" />
Now for the clock code. Like the center clock mode copy/cut the clock code and place it immediately under the above code you just added. Remove the existing padding and replace it with this:
Code:
android:paddingLeft="4.0dip"
so that the entire clock code reads like this:
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingLeft="4.0dip" android:singleLine="true" />
And the finished statusbar.xml should read like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@id/status_bar" android:background="@drawable/system_bar_background" android:focusable="false" android:descendantFocusability="afterDescendants" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_height" android:accessibilityPaneTitle="@string/status_bar"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<ImageView android:id="@id/notification_lights_out" android:paddingBottom="2.0dip" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:paddingStart="@dimen/status_bar_padding_start" />
<LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="@dimen/status_bar_padding_start" android:paddingEnd="@dimen/status_bar_padding_end">
<ViewStub android:id="@id/operator_name" android:layout="@layout/operator_name" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<FrameLayout android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<include layout="@layout/heads_up_status_bar_layout" />
<LinearLayout android:id="@id/status_bar_left_side" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.AlphaOptimizedFrameLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:clipChildren="false" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
</FrameLayout>
<android.widget.Space android:gravity="center" android:id="@id/cutout_space_view" android:layout_width="0.0dip" android:layout_height="fill_parent" />
<com.android.keyguard.AlphaOptimizedLinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include layout="@layout/system_icons" />
<android.widget.Space android:gravity="center" android:id="@id/cutout_space_view" android:layout_width="0.0dip" android:layout_height="fill_parent" />
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingLeft="4.0dip" android:singleLine="true" /> </com.android.keyguard.AlphaOptimizedLinearLayout>
</LinearLayout>
<ViewStub android:id="@id/emergency_cryptkeeper_text" android:layout="@layout/emergency_cryptkeeper_text" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
What do you recommend to decompile and recompile.
Sent from my [device_name] using XDA-Developers Legacy app
jd1639 said:
What do you recommend to decompile and recompile.
Sent from my [device_name] using XDA-Developers Legacy app
Click to expand...
Click to collapse
Ticklemyandroid
I also recommend apktool 2.3.2
https://forum.xda-developers.com/showthread.php?t=1633333
Thanks for the guide..
Is it possible to hide the Status Bar clock in the lockscreen?

Categories

Resources