removing icons from the notification bar? - Droid Incredible Themes and Apps

i've looked over the guide for creating themes, and searched the forums, and i can't figure this out. i tried using ninjamorph to remove the battery icon (by replacing all the icons with a blank transparent 1x1 png), but on reboot it still left the gap where the icon was supposed to be...
i'd like to just get rid of the battery icon and have it shift everything else to the right, so that there's room for more stuff (rather than having the gap stay there like i encountered)...
can anyone help me with this? i'm also thinking about removing the signal meter and using real signal instead...

Its in services.jar in your system/framework dir.
Sent from my ADR6300 using Tapatalk

ok, but how do i actually remove them? the only tutorials i've found on editing services.jar deal with just changing the notification bar colors...i haven't found anything that tells me how to remove icons.

Get the name of the icon you want to remove. Then look it up in public.xml to get its reference address. Then search the status bar classes for where it is referenced. That should get you started.

i must be losing my mind...where do i find public.xml? i am really struggling with this...i've read anything and googled anything and everything i can think of without any luck figuring this out. i've extracted framework-res.apk and can't find public.xml anywhere in there...
i'm sure this is something very simple that will click in my head as soon as someone says something to make it click, but right now i feel very stupid and frustrated...

You're not losing your mind. You have to decompile framework-res in order to read that file.

ok, i've gotten it decompiled thru apktool. we'll see how far i get this time...thanks for your help!

ok, i found this in public.xml...
<public type="drawable" name="stat_sys_battery_0" id="0x01080292" />
<public type="drawable" name="stat_sys_battery_10" id="0x01080293" />
<public type="drawable" name="stat_sys_battery_100" id="0x01080294" />
<public type="drawable" name="stat_sys_battery_20" id="0x01080295" />
<public type="drawable" name="stat_sys_battery_40" id="0x01080296" />
<public type="drawable" name="stat_sys_battery_60" id="0x01080297" />
<public type="drawable" name="stat_sys_battery_80" id="0x01080298" />
but i'm having a hard time finding it in the classes...i don't know if i'm looking in the right place. i ran this:
java -jar baksmali-1.2.4.jar -x services.jar
which gave me a bunch of output .smali files. i've been looking through these to try to find 0x01080292 (for example), but i haven't found anything even remotely close to that in any file i've looked in so far. am i even on the right track here? what should i be doing next?

Look in StatusBarPolicy.smali for references to the battery. I have not done this yet, but if I was to guess, that is where I would start. Forget about the public.xml file. Just look for code that has to do with the battery icons.

unfortunately, i guess this is way over my head...i can't make anything out of these smali files. i have no idea where to even start...
i found what i think is the battery code (there are a ton of references to the battery icon in StatusBarPolicy.smali), but i don't even know where to start to get it to remove the icon...

http://forum.xda-developers.com/showthread.php?t=740502
Would looking at these help you at all?

they do help a bit, in that i can see the differences...but i don't know what changes are for the battery and which are for the location (i'm running skyraider). there's no file that just does location so i can strip that out, at least not for 8/1 based roms...

Related

[Q] Title Bar removal

How do I remove the gray title bar for my app in the xml file for layout?
I cannot find anything I understand, doesn't error, or at least does not require a re-write of too much code.
thanks to anyone with this answer.
LuvinAndroid said:
How do I remove the gray title bar for my app in the xml file for layout?
I cannot find anything I understand, doesn't error, or at least does not require a re-write of too much code.
thanks to anyone with this answer.
Click to expand...
Click to collapse
The title bat background is determined by what is in the ROM's framework-res.apk, not the individual app.
Go to framework-res.apk/drawable-hdpi and replace the activity_title_bar.9 and bottom_bar.9 with the one's you like. Remember, these are .9 files, broken files may give you FCs.
In your AndroidManifest.xml add:
Code:
android:theme="@android:style/Theme.NoTitleBar"
To the <activty ...> tag
Example:
Code:
<activity android:name=".Foo"
android:theme="@android:style/Theme.NoTitleBar" />
ah, thanks guys, the xml file edit was the one that woked for me.
On another note, I am playing around with the SkellyAPP to learn the pricnipals behind Java/Android structures.
How would I load in an image NOT loaded by the xml but one loaded in that I can re-assign placement based on random numbers so I can wrap my head around a "main loop" with action going on.
Sorry for my noobishness, but I learn by taking baby steps and I promise not to spam the forum with too much trivial stuff

Need a little help with framework

Ive been trying to look around for a while and i cant this. In the thunderbolt theme i created, the background blends in with font seen on second post here. I cant seem to find out which file controls that background. Before i port my version for liberty, i really want this fixed. can anyone tell me that.
This is from one of the Bowers awesome guides on themeing here
http://www.droidforums.net/forum/te...ming-guide-changing-system-text-settings.html
After decompiling the framework-res.apk look for the styles.xml in /res/values
Next is the menu text (when you hit he soft key for menu)
Do ctrl + f and put in TextAppearance.Widget.IconMenu.Item and click find next.
You should now be at this area
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">?textColorPrimary</item>
</style>
Change textColorPrimaryInverse (black) to textColorPrimary (white and then black when pressed)
Also you could delete the whole ?textColorPrimary and just put #ffff00ae as an example for the color code you desire.
If that is all you need save and look down for the completing instructions.

[REQ]ICS Modified SystemUI.apk w/out AT&T Logo

The title pretty much sums it up. I'm fine with the stock icons and looks, but I would love a modified SystemUI.apk that just gets rid of the AT&T logo. I'm pretty sure I can remember what carrier I'm using. Especially since it's branded on the front of the phone.
working on it..
I've been looking through the code... can't find anything. I seriously need to brush up on my smaliing
Sent from my SAMSUNG-SGH-I727 using XDA
me either i cant find it..
tw_status_bar.xml in SystemUI.apk\res\layout
Code:
<com.android.systemui.statusbar.phone.CarrierLabel android:gravity="center_vertical" android:id="@id/carrierLabel" android:background="#ff000000" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
is the first thing you're gonna want to get rid of...
theres plenty more carrier and touchwiz references in there as well. Theres also alot of non tw_ layout xmls, for instance status_bar.xml that samsung left in there so i would start replacing tw xmls with the standard.
I could not find most of the standard xmls....status_bar and more weren't in there...
is your res folder just a bunch of images?
if you just simply extract the SystemUI, you wont see them. you're gonna want to decompile it instead. otherwise theyre in resources.arsc
removing all the references in res/values should help...
like
Code:
<public type="id" name="carrierLabel" id="0x7f0f00af" />
Ah found it. And I took it out. I'll test it and upload.
After I get home, that is...
Sent from my SAMSUNG-SGH-I727 using XDA
http://forum.xda-developers.com/showthread.php?t=1568128
love this + apex launcher.
I think it will hold many of you over in the mean time, for me im not sure i'll ever want to change
theHOTNESS said:
tw_status_bar.xml in SystemUI.apk\res\layout
Code:
<com.android.systemui.statusbar.phone.CarrierLabel android:gravity="center_vertical" android:id="@id/carrierLabel" android:background="#ff000000" android:paddingLeft="4.0dip" android:paddingRight="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
is the first thing you're gonna want to get rid of...
theres plenty more carrier and touchwiz references in there as well. Theres also alot of non tw_ layout xmls, for instance status_bar.xml that samsung left in there so i would start replacing tw xmls with the standard.
Click to expand...
Click to collapse
Set layout_width and layout_height to "0.0dip". I also set padding from 4 to 0, but I'm not sure that's required. Recompile and its gone. I don't think you need to edit the others (I didn't).
BTW, don't edit the tw_status_bar_expanded unless your intent is to remove the "AT&T" when you drag the bar down (by the "Clear" button). IMO, it looks weird to remove that one because then the date and the button shift left.
Can we get the information needed to make this happen to the dev over at this theme: http://forum.xda-developers.com/showthread.php?t=1568128&page=5
So he can make this happen in his next update? That would be amazing.
romracer said:
Set layout_width and layout_height to "0.0dip". I also set padding from 4 to 0, but I'm not sure that's required. Recompile and its gone. I don't think you need to edit the others (I didn't).
BTW, don't edit the tw_status_bar_expanded unless your intent is to remove the "AT&T" when you drag the bar down (by the "Clear" button). IMO, it looks weird to remove that one because then the date and the button shift left.
Click to expand...
Click to collapse
glad it worked for you. yeah i noticed removing it completely was somewhat of a bad idea because of the layout changes. its almost like you have to leave placeholders or things float places like css.
new to messing with android files but its funny how much the xml resembles html/css formatting. i would have thought they would have gone a little more "absolute" like apples cocoa bs but i guess this makes more sense for android given all the different screen sizes and dpis...
yeah i took mine out of the expanded as well.
the other edit was a different approach...instead of removing it from the layout i was getting rid of what it referenced to (so no other xml could use @id/carrierLabel) both will work but the former is more elegant.

Brightness slider in notification bar pull down?

This thread talks about the ability to add the brightness slider to the pull down notification area by doing the following mod in SystemUI.apk:
Open res/layout/tw_status_bar_expanded.xml and removing the android:visibility="gone" from the following line:
Code:
<LinearLayout android:orientation="horizontal" android:focusable="true" android:visibility="gone" android:clickable="true" android:layout_width="fill_parent" android:layout_height="56.0dip">
Well, Ninjamorph cannot handle this task since you need to decompile tw_status_bar_expanded.xml to edit that code line, so if anyone could use my attached already highly modded SystemUI.apk (it has a toggle edits, GPS icon removed, battery icons) and decompile, edit the code line, recompile and repost, I would much appreciate it.
Thanks in advance!
Lock-N-Load said:
This thread talks about the ability to add the brightness slider to the pull down notification area by doing the following mod in SystemUI.apk:
Open res/layout/tw_status_bar_expanded.xml and removing the android:visibility="gone" from the following line:
Code:
<LinearLayout android:orientation="horizontal" android:focusable="true" android:visibility="gone" android:clickable="true" android:layout_width="fill_parent" android:layout_height="56.0dip">
Well, Ninjamorph cannot handle this task since you need to decompile tw_status_bar_expanded.xml to edit that code line, so if anyone could use my attached already highly modded SystemUI.apk (it has a toggle edits, GPS icon removed, battery icons) and decompile, edit the code line, recompile and repost, I would much appreciate it.
Thanks in advance!
Click to expand...
Click to collapse
This should work. There were 2 errors while de-compiling regarding your e911 cross hair images. No errors on building though so should be ok.
mastamoon said:
This should work. There were 2 errors while de-compiling regarding your e911 cross hair images. No errors on building though so should be ok.
Click to expand...
Click to collapse
Thanks.. I will try it out and report back. Likely, the errors were the fact that the 2 GPS crosshair images were deleted that stops those annoying crosshairs from showing up
UPDATE: so... yes the 2 errors were the missing png files for the GPS icon. I could fix that easy though with Ninjamorph.
Now, you got the brightness slider in place BUT it does not work it doesn't do anything. I don't blame this on you so no worries as it seems to mean that some other additinal edit needs to be made as this just put the slider in place BUT does not actually activate it's function. So.. kinda worthless sadly
Lock-N-Load said:
UPDATE: so... yes the 2 errors were the missing png files for the GPS icon. I could fix that easy though with Ninjamorph.
Now, you got the brightness slider in place BUT it does not work it doesn't do anything. I don't blame this on you so no worries as it seems to mean that some other additinal edit needs to be made as this just put the slider in place BUT does not actually activate it's function. So.. kinda worthless sadly
Click to expand...
Click to collapse
Half way there
mastamoon said:
Half way there
Click to expand...
Click to collapse
true that.. but I dont know the other half and it would no doubt require deeper edited code to make the slider actually do something
oh well, thanks for the help as I did not expect this would be the outcome.
Lock-N-Load said:
true that.. but I dont know the other half and it would no doubt require deeper edited code to make the slider actually do something
oh well, thanks for the help as I did not expect this would be the outcome.
Click to expand...
Click to collapse
Yeah it looks like the Power Widget edits are what actually do the stuff that slider is requesting. Unfortunately I don't have time to do much smali'ing now, but maybe somebody can finish it up for you. Or in reverse, take a completed one and move your images over to it.
mastamoon said:
Yeah it looks like the Power Widget edits are what actually do the stuff that slider is requesting. Unfortunately I don't have time to do much smali'ing now, but maybe somebody can finish it up for you. Or in reverse, take a completed one and move your images over to it.
Click to expand...
Click to collapse
agreed 100%. I would have to carry over my battery images and the GPS cross hair mod - which I can do with Ninjamorph easy - but then I need to use whatever toggle setup comes in the completed one that has the brightness slider and I rather like the ones I got.
So, for now, I guess I will just sit tight on what I have.
If you like your current toggles, it's only a matter of swapping out the images of lidroid.
Sent from my SCH-I535

[How-To] Edit Contacts.apk/Phone.apk for dialer pad ?

hi everybody, I need some help with dialer pad.
As you can see at the pic, there is much space at the right. The lowermost buttons are not in proper line. How i can resize them to put them in a proper line? Do I need to edit smali codes / values codes? Thanks in advance
The images don't need to be resized.
However you'll have to modify the layout. But this will be a task.
First you'll have to find out which layout it is that contains those three buttons.
The way I narrow my search down is, I go into red/drawable-hdpi/xhdpi/xxhdpi or whatever the resolution is. And look for those icons. Once you find the dialer, phone and contact add icon. Copy the names of these .png's to something then using one of the .png's copy the name and in the layouts folder. Search the images name. This will narrow down the layout.xml's and then from there you can find it. Once you find the layout.
There will be three lines that determine the images, you can fix the layouts by using the following code.
android:layout_gravity="center|center"
android:gravity="center"
Change the first one to where you want to button to be displayed so if its on the right side make it "right|center" or "center|right"
Hopefully I helped.
Sent from my Nexus 5 using Tapatalk
krishneelg3 said:
The images don't need to be resized.
However you'll have to modify the layout. But this will be a task.
First you'll have to find out which layout it is that contains those three buttons.
The way I narrow my search down is, I go into red/drawable-hdpi/xhdpi/xxhdpi or whatever the resolution is. And look for those icons. Once you find the dialer, phone and contact add icon. Copy the names of these .png's to something then using one of the .png's copy the name and in the layouts folder. Search the images name. This will narrow down the layout.xml's and then from there you can find it. Once you find the layout.
There will be three lines that determine the images, you can fix the layouts by using the following code.
android:layout_gravity="center|center"
android:gravity="center"
Change the first one to where you want to button to be displayed so if its on the right side make it "right|center" or "center|right"
Hopefully I helped.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
thanks for your answer
I tried but doesn't fix it. I found what image it shows at dialer pad. it's '' ic_add_contact_holo_dark '' ( how i found it is? I have change the image with another bigger resolution one. Dialer pad shows it bigger but didnt cover more place ( i have thought that if change the icon wiht bigger one maybe it could cover all transparent space. but it didnt ) so with that way i found which image is that! Then,
I followed ur tellings. '' ic_add_contact_holo_dark '' is in Contacts.apk and the layout xml is '' speed_dial_input_dialog.xml '' . Here is the xml codes :
HTML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="horizontal" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<EditText android:id="@id/number" android:layout_width="0.0dip" android:layout_height="48.0dip" android:layout_marginTop="16.0dip" android:layout_weight="0.8" android:inputType="phone" />
<ImageView android:layout_gravity="center_vertical" android:id="@id/contacts" android:layout_width="0.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_add_contact_holo_dark" android:layout_weight="0.2" style="?android:attr/buttonBarButtonStyle" />
</LinearLayout>
I have changed '' android:layout_gravity="center_vertical" '' to android:layout_gravity="center|right"
but doesnt fix it, u have any idea ? really thanks for your help
Mind pulling the .apk from your device and uploading it? Perhaps I can fix it for you.
Sent from my Nexus 5 using Tapatalk
krishneelg3 said:
Mind pulling the .apk from your device and uploading it? Perhaps I can fix it for you.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
here is the link: http://yadi.sk/d/ggjXtOnVQVrjt
Contacts.apk , Phone.apk and Framework-res.apk ...
Thanks
@SmiLeToLife thanks, I will take a look at it in an hour or so. Just woke up.
I'll let you know if I finish it
EDIT -
Couldn't find the needed layout. Sorry :\

Categories

Resources