Related
Does anyone know the code for centering the clock
i am trying to edit statusbar.xml in the layout folder of SystemUI.apk , but I get is a blank black status bar
please help
You can find it in the gingeritis Rom
I think he wants help on how to do it on the rom he's using. but yes gingeritis has this. You may want ask chingy on his forums or on rootzwiki to see if he could give you any advice
Sent from my HTC Mecha using Tapatalk
It is also optional in Eternity through the tweaks. So might hit up that group or just look at how their status bar is setup.
Sent from my HTC Mecha using xda premium
I think the centered clock is cool sometimes but I noticed that notification texts sometimes overlap the centered clock or if you have too many notifications, it makes the status bar look all crammed together
this Thunderbolt has been Infected with a Virus for all Eternity
xXJay_RXx said:
I think the centered clock is cool sometimes but I noticed that notification texts sometimes overlap the centered clock or if you have too many notifications, it makes the status bar look all crammed together
this Thunderbolt has been Infected with a Virus for all Eternity
Click to expand...
Click to collapse
yeah it does on eternity, however i think I can make it go away when a notification comes in
I have the code now, i am just having problems getting my SystemUI.apk to recompile
have you tried using the UOT kitchen and then extracting the SystemUI.apk from the build they give you? atleast you'll know its a modded version of the SystemUI.apk file you got from your own rom.
i took a look at virus' statusbar.xml and i think he is referencing other files for the clock location. probably because of his tweak options.
i will try out UOT
edit: tried out UOT. its not going to do what i am looking for. thanks for the idea though
This is something I've been working on for the past couple of days. And while I've successfully moved the clock to the center of the statusbar, I didn't like the notifications overlapping on the clock.
To try to avoid this, I changed the androidaddingRight value from 10.0dip to 180.0dip. This made it so that the notification text would stop just shy of the clock in portrait mode, but when receiving a notification while in landscape mode (ie. an sms notification), the text would overlap the clock since the 180dip padding wasn't enough to push the text to the left of the clock with the added screen width pixel count that results from being in Landscape mode.
Thus began my searching for alternative methods of setting up the layout of the "tickerView" which is what controls the text layout for notifications.
The only thing I could come up with that would always keep the incoming notification text from overlapping the clock would be to use a RelativeLayout string rather than LinearLayout and use the android:layout_toLeftof format, while using the clock as the id. Or in other words, android:layout_toLeftof="@+id/clock". But inserting that into the XML on the tickerView line was causing a compilation error reporting that the compiler couldn't find the resource for the clock id.
I'm not familiar enough with XML editing to figure out how to remedy this, so I have practically given up at this point and have resorted to allowing notifications to overlap the clock when in Landscape mode, but they are fine (no overlapping) in Portrait mode by using the aforementioned 180dip padding.
If anyone has any ideas on how to add the necessary resources to allow the compiler to recognize the clock id, hit me up and we'll see what we can accomplish.
Boostjunky said:
This is something I've been working on for the past couple of days. And while I've successfully moved the clock to the center of the statusbar, I didn't like the notifications overlapping on the clock.
To try to avoid this, I changed the androidaddingRight value from 10.0dip to 180.0dip. This made it so that the notification text would stop just shy of the clock in portrait mode, but when receiving a notification while in landscape mode (ie. an sms notification), the text would overlap the clock since the 180dip padding wasn't enough to push the text to the left of the clock with the added screen width pixel count that results from being in Landscape mode.
Thus began my searching for alternative methods of setting up the layout of the "tickerView" which is what controls the text layout for notifications.
The only thing I could come up with that would always keep the incoming notification text from overlapping the clock would be to use a RelativeLayout string rather than LinearLayout and use the android:layout_toLeftof format, while using the clock as the id. Or in other words, android:layout_toLeftof="@+id/clock". But inserting that into the XML on the tickerView line was causing a compilation error reporting that the compiler couldn't find the resource for the clock id.
I'm not familiar enough with XML editing to figure out how to remedy this, so I have practically given up at this point and have resorted to allowing notifications to overlap the clock when in Landscape mode, but they are fine (no overlapping) in Portrait mode by using the aforementioned 180dip padding.
If anyone has any ideas on how to add the necessary resources to allow the compiler to recognize the clock id, hit me up and we'll see what we can accomplish.
Click to expand...
Click to collapse
can you attach your systemUI.apk?
racinwarrior said:
can you attach your systemUI.apk?
Click to expand...
Click to collapse
You mean the one I have settled on (where it's fine in portrait mode, but overlaps in landscape)? Or one of the 30 or so experimental/failed attempts?
Sent from my ADR6400L using XDA App
Boostjunky said:
You mean the one I have settled on (where it's fine in portrait mode, but overlaps in landscape)? Or one of the 30 or so experimental/failed attempts?
Sent from my ADR6400L using XDA App
Click to expand...
Click to collapse
the one you settled on. I don't use my phone in landscape and I want to see how you did the clock in xml
racinwarrior said:
the one you settled on. I don't use my phone in landscape and I want to see how you did the clock in xml
Click to expand...
Click to collapse
How about I just paste the status_bar XML?
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="@drawable/statusbar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<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">
<TextView android:textColor="#ffffffff" android:id="@id/plmnLabel" android:paddingTop="3.0sp" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</com.android.systemui.statusbar.IconMerger>
<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: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.0sp" android:gravity="center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</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="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" />
</ImageSwitcher>
<com.android.systemui.statusbar.TickerView android:layout_gravity="center_vertical" android:id="@id/tickerText" android:paddingRight="180.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:textSize="16.0sp" android:gravity="left|center" android:id="@id/date" android:background="@drawable/statusbar_background" 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>
Boostjunky said:
How about I just paste the status_bar XML?
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="@drawable/statusbar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<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">
<TextView android:textColor="#ffffffff" android:id="@id/plmnLabel" android:paddingTop="3.0sp" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</com.android.systemui.statusbar.IconMerger>
<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: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.0sp" android:gravity="center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</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="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" />
</ImageSwitcher>
<com.android.systemui.statusbar.TickerView android:layout_gravity="center_vertical" android:id="@id/tickerText" android:paddingRight="180.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:textSize="16.0sp" android:gravity="left|center" android:id="@id/date" android:background="@drawable/statusbar_background" 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>
Click to expand...
Click to collapse
is there any way you can help me bro?
every time i try to recompile systemui.apk using apk manager, i delete the files ihave modified in the keep folder but when it compiles, the files i deleted never get put back in.
how are you decompiling/recompiling your apk?
racinwarrior said:
is there any way you can help me bro?
every time i try to recompile systemui.apk using apk manager, i delete the files ihave modified in the keep folder but when it compiles, the files i deleted never get put back in.
how are you decompiling/recompiling your apk?
Click to expand...
Click to collapse
You must be getting an error with apkmanager. This happens when there is something wrong with the edits you've made, whether they be XML or .9.PNG (nine patch images) files.
Try this. Delete the contents from your project folder (or rename the project if you have things you need to keep for reference). Then, decompile SystemUI, and without changing anything at all, immediately try recompiling it. If it compiles without any errors, then the problem lies with the edits you've been making.
If it still doesn't compile properly without touching anything, then either the SYSTEMUI has something wrong with it to begin with (such as a bad nine patch image), or it has dependencies, or your apkmanager is broken.
Sent from my ADR6400L using XDA App
I get an error when compiling, but it does compile and install on the phone correctly.
I took the text from your xml file, put it in my statusbar file, and when I recompile
I choose yes for a system apk, then choose yes to copy over all files I did not modify. I then delete all the files I have modified from the keep folder as well as the resources file. when I compile the apk and take a look inside it, the files I deleted do not get put back in the apk
do you mind sending me your systemUI.apk or your compiled statusbar.xml?
I have been trying to get this to work for two days and I am done trying
racinwarrior said:
do you mind sending me your systemUI.apk or your compiled statusbar.xml?
I have been trying to get this to work for two days and I am done trying
Click to expand...
Click to collapse
I can send you the status_bar.xml when I get to a computer. Just out of curiosity, are you attempting to change anything besides the status_bar.xml?
Sent from my ADR6400L using XDA App
Boostjunky said:
I can send you the status_bar.xml when I get to a computer. Just out of curiosity, are you attempting to change anything besides the status_bar.xml?
Sent from my ADR6400L using XDA App
Click to expand...
Click to collapse
Nope. I am just trying to move the clock.
Is there a way to manually compile systemUI using another program? I just dont understand why when i delete the files I modified from the "keep" folder as directed by apk manager, the one i modified do not get put in their place.
It works fine if i dont change anything because nothing needs to be deleted from the keep folder.
i am obviously doing something wrong as i am pretty sure it works fine for others
racinwarrior said:
Nope. I am just trying to move the clock.
Is there a way to manually compile systemUI using another program? I just dont understand why when i delete the files I modified from the "keep" folder as directed by apk manager, the one i modified do not get put in their place.
It works fine if i dont change anything because nothing needs to be deleted from the keep folder.
i am obviously doing something wrong as i am pretty sure it works fine for others
Click to expand...
Click to collapse
Yeah, the only time things get left out after compiling an apk with apkmanager is when you get an error message telling you to check the log using option 21.
And the only time you get that error message is when apkmanager detects a problem with the edits you've made.
My guess is that you're missing a simple character somewhere in the edits you're making to the xml file.
Or... What program are you using to make the edits to the xml files?
Sent from my ADR6400L using XDA App
I've been playing around with trying to get rid of the carrier text that the AT&T variant of the Note II displays in the notification bar if there are no other notification icons up there.
After abusing apktook to get the smali/xml, I find that the carrier logo/text is handled in layout\tw_status_bar.xml. The offending (offensive?) section is:
Code:
<TextView android:textSize="15.0dip" android:gravity="center_vertical" android:id="@id/carrierLabel" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<ImageView android:id="@id/operatorLogoIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_stat_notify_operator_logo" />
The visibility is already set to gone, so changing that won't do the trick. If I delete that textview, systemUI crashes (which kind of makes sense.) I considered setting the entire LinearLayout with a "gone" visibility, but there are other items in that particular LinearLayout that I want visible at times.
Short of hacking the smali deal with this (and I'd be at a loss as to how to go about that right now), is there a way to get rid of just that one carrierLabel?
I've included the entire tw_status_bar.xml file as a code block below for easy viewing (but please don't quote the entire thing when replying.)
Thanks
Gary
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/status_bar_background" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
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:paddingLeft="6.0dip" 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" />
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:paddingLeft="0.0dip" android:paddingRight="2.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/left_icons" android:paddingLeft="4.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<TextView android:textSize="15.0dip" android:gravity="center_vertical" android:id="@id/carrierLabel" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<ImageView android:id="@id/operatorLogoIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_stat_notify_operator_logo" />
<ImageView android:id="@id/doNotDisturbIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/tw_dnd" android:alpha="0.7" android:scaleX="0.85" android:scaleY="0.85" />
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/right_icons" android:paddingRight="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true">
<LinearLayout 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:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/tw_signal_cluster_view" />
<TextView android:textSize="12.0dip" android:textColor="#ffa6a6a6" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" />
<ImageView android:gravity="center" android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
<com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ff959595" android:ellipsize="none" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />
</LinearLayout>
</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="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:layout_marginRight="4.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="centerInside" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="centerInside" />
</ImageSwitcher>
<com.android.systemui.statusbar.phone.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="@style/TextAppearance.StatusBar.PhoneTicker" android:id="@id/ticker_text_view_old" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:id="@id/ticker_text_view_new" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</com.android.systemui.statusbar.phone.TickerView>
</LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
garyd9 said:
Short of hacking the smali deal with this (and I'd be at a loss as to how to go about that right now), is there a way to get rid of just that one carrierLabel?
I've included the entire tw_status_bar.xml file as a code block below for easy viewing (but please don't quote the entire thing when replying.)
Thanks
Gary
Click to expand...
Click to collapse
(Fair warning i have never done any modding/apk editing of any sorts lol).
Have you tried manually specifying the size of the view to 1x1 pixels? I mean technically it would still be there but reasonably should not be view-able.
Edit: nvm
Would it be possible to move the operator textview and imageview into a new linearlayout that's visibility is set to gone?
jug6ernaut said:
(Fair warning i have never done any modding/apk editing of any sorts lol).
Have you tried manually specifying the size of the view to 1x1 pixels? I mean technically it would still be there but reasonably should not be view-able.
Click to expand...
Click to collapse
Same idea over here. I've done similiar things by setting the height/fontsize to 0.
Droidzone said:
Same idea over here. I've done similiar things by setting the height/fontsize to 0.
Click to expand...
Click to collapse
Yes me too
I usually set height to 0.0dip
Cheers
I'll give it a try when I get a chance (tonight, probably.) "Ingress" is starting to ingress into all my dev time. Damn you, google.
Droidzone said:
Same idea over here. I've done similiar things by setting the height/fontsize to 0.
Click to expand...
Click to collapse
I agree...in researching softkey mods its suggested that when you want to remove one of the options from the navbar to set the fontsize/height/dip to 0.0 instead of just deleting the lines. Hope this helps...i can attach the link to the thread of needed
Sent from my SAMSUNG-SGH-I317 using xda app-developers app
Gary, have you considered the xposed framework for this? It sounds like a good way to just get rid of it by hooking the method showing it with a null method
pulser_g2 said:
Gary, have you considered the xposed framework for this? It sounds like a good way to just get rid of it by hooking the method showing it with a null method
Click to expand...
Click to collapse
I'll have to google that... I've never even heard of that framework.
garyd9 said:
I'll have to google that... I've never even heard of that framework.
Click to expand...
Click to collapse
Might save you searching -
http://forum.xda-developers.com/showthread.php?t=1574401
Ofeliax said:
Yes me too
I usually set height to 0.0dip
Cheers
Click to expand...
Click to collapse
This will do it. I did this in my theme to get rid of the carrier and the clock in the status bar.
take a look here
Ahhh... I found a way to (kinda-sorta) do this on the SII. And I see no reason why it shouldn't work here.
Yes, it's cheating. But it works.
Find the hex that controls the color for the carrier identifier. A good majority of what is in SystemUI is colored with transparency hexes. Yeah... you already see where I am going with this. Change those first two digits on your hex to 00.
Technically, yeah, its still there. But that doesn't mean you have to look at it.
Edit: Or just do what the guy above me posted.
i have a international version of this device , so i can not be in your boots , in the international version the carrier text is located in tw statusbar expanded .xml ,
can you share the systemui.apk and the frmework-res.apk and the twframework-res.apk ? so that i can also take a look and try it ,
zohawkish said:
take a look here
Click to expand...
Click to collapse
^^ what he said
Just a followup with this (that I forgot about): I ended up changing the font size to 0.0 and that did exactly what I wanted.
I explored the option for editing the smali for updateNetworkName, but decided that I wasn't happy with the side effect of it causing the network name disappearing from some other areas in the UI.
Thank you,
Gary
looks like the carrier logo name is located in "drawable/tw_stat_notify_operator_logo". So that would mean SystemUI.apk/res/drawable/tw_stat_notify_operator_logo.xml. Changing the string text in that xml should do the trick.
There is a bools value for carrier logo appearance in the xml directory. If it's set to true, change to false. I did the opposite to enable it.
Sent from my SC-02E using Xparent ICS Tapatalk 2
Hi,
I want to display 2 videos each taking half the screen vertically, I put them in a ScrollView in order to show only part of each video. I put both ScrollViews inside a FrameLayout. The problem is that the top VideoView inside the top ScrollView overlaps the bottom VideoView inside the other ScrollView. While if I use anything other than a VideoView on the bottom (A button or a Text Field for example) the top VideoView doesn't Overlap it. I tried to use a LinearLayout instead of a ScrollView in the bottom, but the result was the same.
here is my xml file :
Code:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.compname.appname.Activity2" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="160dp"
android:fillViewport="true" >
<VideoView
android:id="@+id/videoView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</ScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="160dp"
android:background="#BF1"
android:orientation="vertical"
android:layout_gravity="bottom" >
<VideoView
android:id="@+id/videoView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
Any idea what I'm doing wrong here?
All help is appreciated.
Modding - Tweaks - General Changes - Information Sharing​
Hi all firstly i would like to say i am very much still a learner when it come to Android modding and have only been doing this for a couple of months as something new to keep me learning, This is just a thread i am using to keep some of the information and edits i utilise, due to the fact i have 6 kids busy life and bad memory i thought it a good idea to keep this somewhere besides my PC for future reference.
Thread Requirements.
1. Basic knowledge of compiling and decompiling apk and jar files so they can be edited.
2. Notepad++ Download
3. APK editing tool - I have been using APK Multi Tool Version 2.0 WIP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I will start with CustomSettings.apk as i am editing quite often at this time,
I take no credit for this amazing apk that credit goes completely to ficeto
All drawable icons unless already included will have to be added by the modder
Adding CustomSettings.apk to SecSettings
Firstly you will need to register customsettings to your system to do this
1. pull/extract your SecSettings.apk and decompile it
2.open res/xml/display_headers add line anywhere in display_headers ( where you place it will vary where its shown in phone menu )
Example i placed mine just after the line
Code i placed mine after
Code:
<header android:id="@id/setting_search">
<intent android:targetPackage="com.android.settings" android:targetClass="com.android.settings.search.SearchMain" />
</header>
Code to add to display_headers
Code:
<header android:title="@string/BlaizzrRom" />
<header android:icon="@drawable/ic_settings_blaizzr" android:title="@string/Rom_Ext_Fea">
<intent android:targetPackage="com.ficeto.customsettings" android:action="android.intent.action.MAIN" android:targetClass="com.ficeto.customsettings.RandomActivity" />
</header>
Now open res/values/strings.xml and add these lines, You can change the highlighted text in RED to whatever you want to display in you'r menu, The GREEN highlight text is the Category text
Code to add to Strings[/B
Code:
<string name="Rom_Ext_Fea">[COLOR="Red"]Extended Features[/COLOR]</string>
<string name="BlaizzrRom">[COLOR="Lime"]Blaizzr Rom Settings[/COLOR]</string>
Save\ Recompile Secsettings\ Ensure CustomSettings.apk is already on phone and permissions set correct, push SecSettings to phone set permissions restart and you should now have your extended menu displayed.
It wont really do much ATM until there are some options added..
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Naming CustomSettings Menu
Once you have CustomSettings registered to your system you may want to rename to new menu to better suit your custom rom, To do this
1. decompile Customsettins.apk
2. go res/value/strings.xml
3 Find the entry named " app_name " change this to whatever you want the new menu to be registered as within your system.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CustomSettings clickable changing menu headers ( pics )
This one has abit more to it to follow, i will try and make it easy to understand ( sorry if it gets confusing )
1. select 2 pics you wish to use for your headers, name them to easily identify, preferably bnp format but it does not matter to much, i have used gif,jpeg and other with success ( gifs dont animate though )
2. add selected pics to customsettings/res/drawable
3. in same drawable folder create 2 new xml files call these anything you like but it may be usefull to name them something like "rombanner01" & rombanner02 for easy callback
4. in rombanner01.xml add this code ( red highlight area is where you add the name of your pic, same pic name in both entries )
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/[COLOR="Red"]addsecondpicnamehere[/COLOR]" />
<item android:state_selected="true" android:drawable="@drawable/[COLOR="Red"]addsecondpicnamehere[/COLOR]" />
<item android:drawable="@drawable/rombanner02" />
</selector>
5. in rombanner02 add this code ( red highlight area is where you add the name of your other pic )
Code:
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="3000" android:drawable="@drawable/[COLOR="Red"]addfirstpicnamehere[/COLOR]" />
</animation-list>
6.goto res/loyout and create a new xml file ( name it anything you want for this guide i will use rombanner.xml) add this code
In this code set android:layout_width to the screen width of your device, --- change android:layout_height to the height you want your pic to display at.
Code:
<?xml version="1.0" encoding="utf-8"?>
<ImageView android:layout_gravity="center" android:paddingBottom="3.0dip" android:clickable="true" android:layout_width="1080.0px" android:layout_height="225.0px" android:src="@drawable/rombanner01" android:scaleType="fitXY"
xmlns:android="http://schemas.android.com/apk/res/android" />
7. Now ensure all these new xml files are saved. Now open res/xml/prefences.xml
add this code right below the xmlns:android="http://schemas.android.com/apk/res/android"> line of text ( highlighed red text is where you add the name of your new layout.xml )
Code:
<PreferenceScreen android:layout="@layout/[COLOR="Red"]rombanner[/COLOR]" android:selectable="true" android:key="rom_logo" />
Now recompile your customsettings push to phone and set correct properties and check your new menu you should now have your pic at top of new menu page and when you press it it should switch to your alt picture.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CustomSettings general pages setup
Everything related to page setup is basically controlled by the res/xml/preferences.xml
to setup a basic page you would use code ( the space between the code would be filled with your code for on that page.
Code:
<PreferenceScreen android:title="Basic Apps Control" android:summary="Control over some of the included applications">
</PreferenceScreen>
Above code will create a page called Basic Apps Control, with a subtext of Control over some of the included applications
CustomSettings adding sub-header / Category
This is used to split pages into sub Categories the code is
Code:
<PreferenceCategory android:title="Application Selection">
</PreferenceCategory>
Above code will create a category called Application selection.
To utilise together we just add them together, Firstly we create the page itself then we add the sub category like so
Code:
<PreferenceScreen android:title="Basic Apps Control" android:summary="Control over some of the included applications">
<PreferenceCategory android:title="Application Selection">
</PreferenceCategory>
</PreferenceScreen>
adding your code between them will add the that item to this page in this category. eg
Code:
<PreferenceScreen android:title="Basic Apps Control" android:summary="Control over some of the included applications">
<PreferenceCategory android:title="Application Selection">
<Preference android:icon="@drawable/ic_SuperSu" android:title="SuperSu" android:key="activity;eu.chainfire.supersu;eu.chainfire.supersu.MainActivity" android:summary="Root Access Control" />
</PreferenceCategory>
</PreferenceScreen>
Will add a tab for superSu and launch the application upon being selected
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is just the start there is much more to come, sorry i can only add info as i get chance and i will continue to add as i go, if there are any questions or anything else please ask, and if you have any guides you would like to share then please let me know and i will add/link them
Hope this helps someone somewhere and not just me lol
BongOfWar
3minit quick launch and S Finder, Quick Connect on one panel with toggle Android L
First i take no credit for the quick launch mod that belongs to @gharrington
You will need to download 3minit quick launcher smali from here
Just grab the smali files as the codes on there do not work for Lillipop.
now decompile SystemUI.apk and goto..
SystemUI.apk\res\layout open quick_connect_layout_zero.xml
Change it to following:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:id="@id/sfinder_qconnect_layout" android:background="@drawable/quick_connect_layout_bg" android:focusable="true" android:descendantFocusability="afterDescendants" android:layout_width="fill_parent" android:layout_height="@dimen/finder_connect_layout_height"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<HorizontalScrollView android:scrollbars="none" android:layout_width="fill_parent" android:layout_height="@dimen/3minit_quick_layout_height">
<com.android.systemui.statusbar.policy.quicklaunch.QuickLaunchContainer android:gravity="center" android:layout_width="wrap_content" android:layout_height="@dimen/3minit_quick_layout_height" android:layout_centerHorizontal="true" />
</HorizontalScrollView>
<LinearLayout android:orientation="vertical" android:id="@id/sfinder_qconnect_layout" android:focusable="true" android:descendantFocusability="afterDescendants" android:layout_width="fill_parent" android:layout_height="@dimen/finder_connect_layout_height">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:paddingLeft="@dimen/finder_connect_button_padding_right" android:paddingTop="@dimen/finder_connect_button_padding_top" android:paddingRight="@dimen/finder_connect_button_padding_left" android:paddingBottom="@dimen/finder_connect_button_padding_bottom" android:focusable="true" android:descendantFocusability="afterDescendants" android:layout_width="fill_parent" android:layout_height="wrap_content">
<RelativeLayout android:id="@id/sfinder_button_layout" android:background="@drawable/ripple_drawable" android:focusable="true" android:nextFocusLeft="@id/quick_connect_button_layout" android:nextFocusRight="@id/quick_connect_button_layout" android:clickable="true" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_weight="0.5" android:layout_marginEnd="9.0dip">
<TextView android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:gravity="center" android:id="@id/sfinder_button_big" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/accessibility_sfinder_button" android:singleLine="true" android:drawableLeft="@drawable/tw_quick_panel_quick_sfinder_button_image" android:drawablePadding="@dimen/tw_quick_panel_sfinder_qconnect_drawable_padding" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:fontFamily="sec-roboto-light" />
</RelativeLayout>
<ImageView android:id="@id/expanded_divider_3" android:background="@color/quickpanel_button_divider_color" android:layout_width="1.0dip" android:layout_height="17.0dip" android:layout_marginTop="18.0dip" android:layout_marginBottom="18.0dip" android:alpha="@dimen/quickpanel_button_divider_alpha" android:layout_toStartOf="@id/sfinder_button_layout" />
<RelativeLayout android:id="@id/quick_connect_button_layout" android:background="@drawable/ripple_drawable" android:focusable="true" android:nextFocusLeft="@id/sfinder_button_layout" android:nextFocusRight="@id/sfinder_button_layout" android:clickable="true" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_weight="0.5" android:layout_marginStart="9.0dip">
<TextView android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:gravity="center" android:id="@id/qconnect_button_big" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/accessibility_qconnect_button" android:singleLine="true" android:drawableLeft="@drawable/tw_quick_panel_quick_qconnect_button_image" android:drawablePadding="@dimen/tw_quick_panel_sfinder_qconnect_drawable_padding" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:fontFamily="sec-roboto-light" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
Now goto SystemUI\res\values\dimens.xml search for "finder_connect_layout_height"
Change code in Red, Add code in Green
Code:
<dimen name="finder_connect_layout_height">[COLOR="Red"]132.0dip[/COLOR]</dimen>
[COLOR="Green"]<dimen name="3minit_quick_layout_height">75.0dip</dimen>[/COLOR]
Toggle
Goto SystemUI\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali
search for code "iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mQconnectSfinderView:Lcom/android/systemui/statusbar/QconnectSfinderView;
" (( I use this line as only had 1 line of this in smali ) if you find more than 1 of this line let me know and i will edit guide )
Directly below this code add
Code:
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "3minit_quick_connect_toggle"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-nez v0, :cond_5
Custom Settings
Basic Switch and SystemUI Restart..
Code:
<SwitchPreference android:title="Quickconnect Panel" android:key="3minit_quick_connect_toggle" android:summaryOn="Panel is hidden" android:summaryOff="Panel is shown" />
<Preference android:title="Restart SystemUI" android:key="tool#restartsystemui" android:summary="Tap after setting 3minit Quick Connect Panel" />
Screen shots below of both panel showing and panel gone through using toggle
Good
mine
mine2
new guide added, hope this is useful to someone
Hi, I'm using android 4.2.2 and I'd like to build a power control widget/toggle for my app (example of power control widgets/toggles: https://developer.android.com/design/media/widgets_control.png).
I'm experiencing a lot of difficulties in achieving this task. Debugging this stuff is hard, also reading android developer official documentation and online resources, especially due to the lack of specific examples and tutorial related to this type of objects.
My power control widget/toggle should be composed as following:
- a button as big as around the widget size. Button must be resizable and dark gray;
- a icon with with transparent/alpha background. The icon should not be resizable and it must be centered inside the button;
- a stripe placed at the bottom of button, without margins. The stripe must be light gray and resizable only horizontally (it should always have a thickness of 4dp).
I've tried several methods (for example: relativelayouts, linearlayouts, imagebutton ...), made many checks with test widgets but each method I've tried has always shown new issues and it has not proven effective in order to complete the task (for example: issues about adjusting objects' dimensions and their mutual positions, issues with some objects not displaying theirself, issues with margins and paddings, ...).
This is my current widget.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_margin="10.0dp">
<ImageButton
android:id="@+id/widget_button"
android:background="@drawable/rounded"
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:src="@drawable/ic_usb_test"
android:tint="#ff777777" />
<ImageView
android:id="@+id/widget_bottom"
android:background="@drawable/roundedlightgrey"
android:gravity="end"
android:layout_width="match_parent"
android:layout_height="4.0dp" />
</LinearLayout>
Exactly, how should I change properties in order to get a really working power control widget/toggle? Any ideas?
Solved
I've found a way to make things happen. Thanks to a irc user, I've, respectively, changed and added android:layout_height and android:layout_weight attributes to ImageButton object.
Then, I've adjusted the size of the widget dividing android:layout_margin attribute on all four sides (bottom, left, right, right, top).
Finally, I've set the icon, removing the tint too.
Here is the layout that helped me getting widget as in attached screenshot:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginBottom="10.0dp"
android:layout_marginLeft="12.5dp"
android:layout_marginRight="12.5dp"
android:layout_marginTop="10.0dp">
<ImageButton
android:id="@+id/widget_button"
android:background="@drawable/rounded"
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_gravity="center"
android:src="@drawable/ic_slide_switch_off" />
<ImageView
android:id="@+id/widget_bottom"
android:background="@drawable/roundedlightgrey"
android:gravity="end"
android:layout_width="match_parent"
android:layout_height="4.0dp" />
</LinearLayout>