[Q] Editing an .apk file. - Android Q&A, Help & Troubleshooting

I am new to the android development. But i want to learn and i am trying.....I have Samsung galaxy tab 2 P3100 currently running CM10.....I rooted that myself and i can install different roms i.e. I can understand the instructions.... I want to edit an app called 7notes with mazec....the app looks like this when installed.....
1) The blue rectangle shows an app called Notebooks which is a note taking app...
2) The red rectangle shows the app i want to edit i.e. 7notes with mazec which is an input method....
I am a right handed guy....i want to edit the app so that it will be convenient for me to use....I want the app to look like this.....
Is there any way i can edit the app like that....i can provide the .apk file....

AkshayGTP3100 said:
I am new to the android development. But i want to learn and i am trying.....I have Samsung galaxy tab 2 P3100 currently running CM10.....I rooted that myself and i can install different roms i.e. I can understand the instructions.... I want to edit an app called 7notes with mazec....the app looks like this when installed.....
1) The blue rectangle shows an app called Notebooks which is a note taking app...
2) The red rectangle shows the app i want to edit i.e. 7notes with mazec which is an input method....
I am a right handed guy....i want to edit the app so that it will be convenient for me to use....I want the app to look like this.....
Is there any way i can edit the app like that....i can provide the .apk file....
Click to expand...
Click to collapse
It "should" be as simple as editing the res/layout to the values you want. I say "should" because I've never done more than a center clock mod in respect to moving placement of items. Hopefully someone can either verify this, or send you on the right path :thumbup:
Sent from my SPH-D710 using xda premium

Stryke_the_Orc said:
It "should" be as simple as editing the res/layout to the values you want. I say "should" because I've never done more than a center clock mod in respect to moving placement of items. Hopefully someone can either verify this, or send you on the right path :thumbup:
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Here is a link for the .apk file...... https://www.dropbox.com/sh/xnm0f7qax191raw/KZRRuJSsh-
I found the layout folder already.....i think the related xml code is in the /res/layout/keyboard_handwriting.xml file.... am i correct?
i dnt know anything about the xml.....mean while, i will try to find out how to relocate the layout for the buttons.....
Can you send me the original and the edited xml file of the mod you did abt the center clock? maybe this mod is on the similar lines.....That will help me understand the modifications in this app.....

AkshayGTP3100 said:
Here is a link for the .apk file...... https://www.dropbox.com/sh/xnm0f7qax191raw/KZRRuJSsh-
I found the layout folder already.....i think the related xml code is in the /res/layout/keyboard_handwriting.xml file.... am i correct?
i dnt know anything about the xml.....mean while, i will try to find out how to relocate the layout for the buttons.....
Can you send me the original and the edited xml file of the mod you did abt the center clock? maybe this mod is on the similar lines.....That will help me understand the modifications in this app.....
Click to expand...
Click to collapse
Yes, it appears to be that file. The xml's arent difficult to edit as long as you know what you're looking for, and know what terminology to use.
Code:
[SIZE="1"] <ImageView android:id="@id/delete_backward" android:paddingTop="@dimen/bottom_bar_padding_top" android:paddingBottom="@dimen/bottom_bar_padding_bottom" android:layout_width="@dimen/img_w_menubar_button" android:layout_height="@dimen/img_h_menubar_button" [COLOR="Red"]android:layout_marginRight[/COLOR]="@dimen/bottom_bar_btn_margin" android:src="@drawable/backspace" android:layout_toLeftOf="@id/new_line" [COLOR="Red"]android:layout_alignBottom[/COLOR]="@id/menu" />
<ImageView android:id="@id/delete_stroke" android:paddingTop="@dimen/bottom_bar_padding_top" android:paddingBottom="@dimen/bottom_bar_padding_bottom" android:layout_width="@dimen/img_w_menubar_button" android:layout_height="@dimen/img_h_menubar_button"[COLOR="Red"] android:layout_marginRight[/COLOR]="@dimen/bottom_bar_btn_margin" android:src="@drawable/delete_stroke_n" [COLOR="Red"]android:layout_toLeftOf[/COLOR]="@id/new_line" [COLOR="red"]android:layout_alignBottom[/COLOR]="@id/menu" />
[/SIZE]
The code selected in red, is what you would to change, however, I'm not entirely sure what to change them to. I would try to find an app that already has something setup like you want this to be and look at the layout of those buttons.
The center clock mod I found using this guide only edited one line, like this
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" [COLOR="red"]android:gravity="left|center"[/COLOR] android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
and changed it to this
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" [COLOR="Blue"]android:gravity="center"[/COLOR] android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
again, the code in red is the original, and code in blue is edited.
You could try something to the effect of
Code:
<ImageView android:id="@id/delete_stroke" android:paddingTop="@dimen/bottom_bar_padding_top" android:paddingBottom="@dimen/bottom_bar_padding_bottom" android:layout_width="@dimen/img_w_menubar_button" android:layout_height="@dimen/img_h_menubar_button[COLOR="Blue"]android:layout_marginLeft[/COLOR]="@dimen/bottom_bar_btn_margin" android:src="@drawable/delete_stroke_n" [COLOR="Blue"]android:layout_alignBottom[/COLOR]="@id/new_line" [COLOR="red"]android:layout_alignBottom[/COLOR]="@id/menu" />
Obviously, I dont know if this will work or not, but you can try it. Just make sure you keep your original apk so you can replace it if you need to:good:

Stryke_the_Orc said:
Yes, it appears to be that file. The xml's arent difficult to edit as long as you know what you're looking for, and know what terminology to use.
Code:
[SIZE="1"] <ImageView android:id="@id/delete_backward" android:paddingTop="@dimen/bottom_bar_padding_top" android:paddingBottom="@dimen/bottom_bar_padding_bottom" android:layout_width="@dimen/img_w_menubar_button" android:layout_height="@dimen/img_h_menubar_button" [COLOR="Red"]android:layout_marginRight[/COLOR]="@dimen/bottom_bar_btn_margin" android:src="@drawable/backspace" android:layout_toLeftOf="@id/new_line" [COLOR="Red"]android:layout_alignBottom[/COLOR]="@id/menu" />
<ImageView android:id="@id/delete_stroke" android:paddingTop="@dimen/bottom_bar_padding_top" android:paddingBottom="@dimen/bottom_bar_padding_bottom" android:layout_width="@dimen/img_w_menubar_button" android:layout_height="@dimen/img_h_menubar_button"[COLOR="Red"] android:layout_marginRight[/COLOR]="@dimen/bottom_bar_btn_margin" android:src="@drawable/delete_stroke_n" [COLOR="Red"]android:layout_toLeftOf[/COLOR]="@id/new_line" [COLOR="red"]android:layout_alignBottom[/COLOR]="@id/menu" />
[/SIZE]
The code selected in red, is what you would to change, however, I'm not entirely sure what to change them to. I would try to find an app that already has something setup like you want this to be and look at the layout of those buttons.
The center clock mod I found using this guide only edited one line, like this
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" [COLOR="red"]android:gravity="left|center"[/COLOR] android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
and changed it to this
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" [COLOR="Blue"]android:gravity="center"[/COLOR] android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
again, the code in red is the original, and code in blue is edited.
You could try something to the effect of
Code:
<ImageView android:id="@id/delete_stroke" android:paddingTop="@dimen/bottom_bar_padding_top" android:paddingBottom="@dimen/bottom_bar_padding_bottom" android:layout_width="@dimen/img_w_menubar_button" android:layout_height="@dimen/img_h_menubar_button[COLOR="Blue"]android:layout_marginLeft[/COLOR]="@dimen/bottom_bar_btn_margin" android:src="@drawable/delete_stroke_n" [COLOR="Blue"]android:layout_alignBottom[/COLOR]="@id/new_line" [COLOR="red"]android:layout_alignBottom[/COLOR]="@id/menu" />
Obviously, I dont know if this will work or not, but you can try it. Just make sure you keep your original apk so you can replace it if you need to:good:
Click to expand...
Click to collapse
Thank you very much Stryke_the_Orc.....i tried what you suggested but i am getting some compilation error.....i not only want to move the buttons horizontally but i want them staked also.... i will keep looking for solution....

AkshayGTP3100 said:
Thank you very much Stryke_the_Orc.....i tried what you suggested but i am getting some compilation error.....i not only want to move the buttons horizontally but i want them staked also.... i will keep looking for solution....
Click to expand...
Click to collapse
Good luck to you, like I said, I wasn't sure that would work, but it should give you some idea of what you're looking for:beer:
Sent from my SPH-D710 using xda premium

Related

[MOD] [Guide How To] SystemUI.apk for Transparent notifications background

Hello,
You maybe notice that nothing happens when you try to change, shade_bg.png and shade_header_background.9.png
Thats because the resources didn't point to the right images, However here you have a SystemUI.apk that i modded, so you can get transparent notification background and etc.. for your themes.
Hope you like it
Download Links - (please do not mirror)
[Latest - 4.0.1.A.0.283]
AdamTT_SystemUI.zip - Transparent notifications background + statusbar
AdamTT_SystemUI2.zip - Transparent notifications background
[Old - 4.0.A.2.368]
AdamTT_SystemUI.zip - Transparent notifications background
AdamTT_SystemUI2.zip -Transparent notifications background + statusbar
Flash .zip i recovery
Guide How to:
First of all decompile SystemUI.apk
Step 1
In res/layout/status_bar_tracking.xml
change this:
Code:
<View android:background="#ff212121" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
to
Code:
<View android:background="@drawable/shade_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
Save and close
(this is to point the notifications backgruond to the image instead of just a color)
Step 2
In res/layout/status_bar_expanded.xml
change this:
Code:
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/noNotificationsTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
to
Code:
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/noNotificationsTitle" android:background="@drawable/shade_header_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
and this:
Code:
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/ongoingTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_ongoing_events_title" />
to
Code:
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/ongoingTitle" android:background="@drawable/shade_header_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_ongoing_events_title" />
and this:
Code:
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/latestTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_latest_events_title" />
to
Code:
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/latestTitle" android:background="@drawable/shade_header_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_latest_events_title" />
Save and close
(this is to point the headers to the image instead of just a color)
Step 3
In smali/com/android/systemui/statusbar/StatusBarService.smali
Search for this: .method onBarViewAttached()V
Shortly after that, you will find this:
Code:
const/4 v0, 0x2
Change it to:
Code:
const/4 v0, -0x3
(this is so we can make the notifications background transparent)
Search for this: new-instance v0, Landroid/view/WindowManager$LayoutParams;
Shortly after that, you will find this:
Code:
const/4 v5, 0x2
Change it to:
Code:
const/4 v5, -0x3
Save and close
(this is so we can make the statusbar transparent)
Step 4
Now you can change the images:
shade_bg.png
shade_header_background.9.png
statusbar_background.9.png
to get it transparent, or whatever you like.
When you done, Compile it and push it to the phone
Or you can do it the easy way, just copy the files from my SystemUI.apk
Can we have screenshots
Sent from my LT15i using XDA Premium App
hey adam....
.....i'm asking myself if your mod actually enables background transparency throughout the system, including the background of settings, messages, etc....I've been trying to enable transparency for the whole ui by just editing images, which hasn't worked out that well so far, so it'd be quite cool if your mod could help me finally do that
thx for sharing
festa20 said:
Can we have screenshots
Sent from my LT15i using XDA Premium App
Click to expand...
Click to collapse
yepp, fix it soon.
279Paddy said:
hey adam....
.....i'm asking myself if your mod actually enables background transparency throughout the system, including the background of settings, messages, etc....I've been trying to enable transparency for the whole ui by just editing images, which hasn't worked out that well so far, so it'd be quite cool if your mod could help me finally do that
thx for sharing
Click to expand...
Click to collapse
no, it's just the notification pulldown background
Great work Adam Gonna try it..
Edit: Done.. Thanks Adam
Mano1982 said:
Great work Adam Gonna try it..
Edit: Done.. Thanks Adam
Click to expand...
Click to collapse
Did u use UOT kitchen to write your name on footer of notification bar ???
How to use it... Every time i tried, submit button was disabled...!!!
in wich folder can i find SystemUI.apk?
system/app
thanks AdamTt
I combine this Mod and Transparent notifications bar Mod
man thanks for this, using it now
adiktz said:
Did u use UOT kitchen to write your name on footer of notification bar ???
How to use it... Every time i tried, submit button was disabled...!!!
Click to expand...
Click to collapse
Submit button should not be disabled I don't know the reason, but if you want, i can try to make these files for you using UOT Kitchen
I'm glad everyone liked it.
please hit thanks button
I think I screwed up.. my notification bar disappeared altogether.
icepixie said:
I think I screwed up.. my notification bar disappeared altogether.
Click to expand...
Click to collapse
it's the permissions mate, you have to ensure it's set the same as the original SystemsUI.apk first. Then reboot. It should come back.
This is What I want exactly~~~ Thank you so much!!! AdamTt..
Could you share us how you had modified this....??
As you mentioned, the resource didn't point to the right image~~ So I think you should modify some xml file....
I'd like to make the background of system app transparent but still not find out~~~
If you do, I can get some idea or inspiration from you comment~~
Pls~~~ Pls~~`
Mano1982 said:
Great work Adam Gonna try it..
Edit: Done.. Thanks Adam
Click to expand...
Click to collapse
I like yout font and colour scheme. How did you do it mate? Thanks.
wow, i love it
Mano1982 said:
Great work Adam Gonna try it..
Edit: Done.. Thanks Adam
Click to expand...
Click to collapse
Hi there, can you tell me what widget are you using to show the houly temperature and graph?
thanks!
xeon11 said:
I like yout font and colour scheme. How did you do it mate? Thanks.
Click to expand...
Click to collapse
Thanks i did it using UOT Kitchen

Center Clock mod - Guide up / Flashable .Zip

Has anyone tried/managed to get the clock on the CM7.1 rom to display in centre
Iv followed instuction from here:
http://forum.xda-developers.com/showthread.php?t=1174202 By Taine0
And also from here
http://forum.xda-developers.com/showthread.php?t=1202866 By ZduneX25
But run into Error whilst decompiling the SystemUI.apk
Anyone had any luck with this, or advice/help
Iv added a Flash-able .zip which is at the bottom of this post,
This works on my CM7.1.0 - FXP041 so should work with yours.
Please do a back-up in case it messes things up.
If is does mess things up and you didnt back up, just reflash the CM7.1.0 - FXP041.Zip over the top you retain all data.
EDIT:
Ok im getting better at learning XML editing, its been a long night.
but iv been using this guide here with some good effects.
Still a few problems that i need to work out.
Big thanks to member: K Dotty for helping me out.
&
TheGrammarFreak - for guide below.
TheGrammarFreak said:
Hokay, I'll explain the way I make the edits.
I use APKTool to manage decompiling and rebuilding the apk, simply because I like it. I'm also on Linux and apkmanager doesn't work too well.
So I have apktool in my path, so I can be anywhere on my system and use it.
Code:
cd Android
mkdir StatusBarMOD
cd StatusBarMOD
Copy the SystemUI.apk there, then
Code:
apktool d SystemUI.apk
APK Tool does its thing, then I go to the status_bar.xml and open it up in gedit.
Editing status_bar.xml
Centre the clock
For the clock you need to find this line:
So CTRL+F, search for "clock" then select the whole line. Your text editor might break it into 2 lines, make sure you get the whole XML tag (between ").
Delete that, then copy this line to your clipboard:
Code:
<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="15.0sp" android:typeface="normal" android:textStyle="bold" android:textColor="#ff000000" android:gravity="center" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
</LinearLayout>
If you're using an HDPI phone change this bit
Code:
android:paddingTop="2.0px"
to
Code:
android:paddingTop="3.0px"
and if you're using an LDPI phone change it to
Code:
android:paddingTop="1.0px"
If you're as cool as me, you'll have an MDPI phone, so you can leave it as it is.
So, line copied to clipboard you need to past it to just BELOW this line:
Code:
xmlns:android="http://schemas.android.com/apk/res/android">
Clock = centred.
Centre the date
Find this line (it's right at the bottom):
Now, for this MOD I won't give you a premade version, but I'll tell you what to change (that way we learn ).
To centre the clock you need to change the android:gravity property. At the moment it's set to "left|center". All you need to do is change it to "center". If you have a semi transparent status bar and you want to avoid it looking ugly you may also want to extend the date's background across the whole status bar. To do that you need to change the "android:layout_width" property. Instead of "wrap_content" it should say "fill_parent"
Date = centred
Flip the status bar icons around
Ok, so this one is a little weird. You need to change the alignment, the gravity and the order of 2 elements. Each XML tag has an ID, which we'll use to identify the bits we need to move. The ID can be found next to the property "android:id". The battery, signal and 3G icons are part of
Code:
android:id="@id/statusIcons"
So find the tag with that in it (CTRL+F is your friend) then select the whole tag. It's between the bit that says "" The whole thing will look something like this:
You need to cut it out (CTRL+X), and move it to just BELOW the LinearLayout with the ID
Code:
android:id="@id/icons"
So once moved, we need to change the alignment and the gravity. Near the end of the line you just moved it has this property:
Code:
android:layout_alignParentRight="true"
You need to change it to
Code:
android:layout_alignParentLeft="true"
You also need to change the android:gravity to
Code:
android:gravity="left"
Part one sorted.
To move the notifications over to the right you need to do this:
In the tag ID'd
Code:
android:id="@id/icons"
you need to change the alignment to right (alignParentLeft to alignParentRight) and change the gravity to "right"
Rebuilding the apk
Go back to your command line and issue this:
Code:
apktool b SystemUI
In the folder you decompiled in you will see a folder named SystemUI. Once you rebuild your apk using apktool you'll notice that 2 new folders are in that folder (the SystemUI one): build and dist. Go into the build folder, then apk --> res --> layout. Also, make a backup of your original SystemUI.apk, then open the original using 7zip, winrar or the archive manager on linux. DO NOT EXTRACT THE ARCHIVE, JUST OPEN IT! Now, within the archive, navigate to res --> layout. Go back to the folder you just opened, and drag the status_bar.xml found there into the archive window, overwriting the status_bar.xml already there. Close everything, then push the now modified SystemUI.apk to your phone using ADB and reboot. Job done!
I may edit this post after I publish it, to fix typos and the like.
Hope this helps y'all!
I might also add that, as an Englishman, spelling "centre" as "center" is a nightmare. Oh so often my compile fails because I spelt centre correctly.
Click to expand...
Click to collapse
Added a zip for people on CM7.1.0 - FXP041 to try out !!
It worked! Thanks for this!
Hi mate
Worked for me
Thanx
Sent from my LT15i using xda premium
but the font should be bold hours!
can u make the same for .283 also?
muzontnt said:
but the font should be bold hours!
Click to expand...
Click to collapse
Iv changed all system fonts on my phone, might be why it's not bold., can't remember.
Sent from my Arc to your eyes.
punkmonkey1984 said:
Added a zip for people on CM7.1.0 - FXP041 to try out !!
Click to expand...
Click to collapse
It's only a few days ago since you were asking how to change images, and now you've posted this.
Life's about learning, so i ask people for advice and work things out.
I really want to try getting in to coding then hopefully making roms like miui.
Sent from my Arc to your eyes.
punkmonkey1984 said:
changed all system fonts on my phone
Click to expand...
Click to collapse
: D but the date is displayed in bold
muzontnt said:
: D but the date is displayed in bold
Click to expand...
Click to collapse
Very true.
try this
Decompile your systemUI.apk
go to
SystemUI.apk\res\layout
Open status_bar.xml
Find
Code:
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="15.0sp" android:typeface="normal" android:textStyle="normal" android:textColor="#ffffffff" android:gravity="center" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
change to
Code:
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="15.0sp" android:typeface="bold" android:textStyle="bold" android:textColor="#ffffffff" android:gravity="center" android:paddingTop="3.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_weight="1.0" />
Re-compile
over write original systemUI.apk in /system/app
reboot.
should working, not tested.
Can I flash the zip file if I'm using CM7.1.0-Ba2tF-Olympus? If so, how do I do that? Can I just use ROM Manager?
Sorry. I just unlocked bootloader and installed CM7 a few days ago so I'm still getting used to all of this. Thanks for your patience!
Will this working on stock ROM?? 42 fw
Sent from my Anzu using xda premium
punkmonkey1984 said:
Has anyone tried/managed to get the clock on the CM7.1 rom to display in centre
Iv followed instuction from here:
http://forum.xda-developers.com/showthread.php?t=1174202 By Taine0
And also from here
http://forum.xda-developers.com/showthread.php?t=1202866 By ZduneX25
But run into Error whilst decompiling the SystemUI.apk
Anyone had any luck with this, or advice/help
Iv added a Flash-able .zip which is at the bottom of this post,
This works on my CM7.1.0 - FXP041 so should work with yours.
Please do a back-up in case it messes things up.
If is does mess things up and you didnt back up, just reflash the CM7.1.0 - FXP041.Zip over the top you retain all data.
EDIT:
Ok im getting better at learning XML editing, its been a long night.
but iv been using this guide here with some good effects.
Still a few problems that i need to work out.
Big thanks to member: K Dotty for helping me out.
&
TheGrammarFreak - for guide below.
Click to expand...
Click to collapse
how to center clock in lockscreen?

What am I doing wrong? (modding)

Someone gave me a mod that adds 15 toggle to my ROM, the only problem is it takes away the brightness slider which I really liked, and it uses different battery icons then I'd like.
So, I took the file he gave me and first set to work changing the brightness slider and getting it back.
Vertumus, who made the theme I'm using, JB Domination, said you edit the file tw_status_bar_expanded.xml and take out this code:
PHP:
<LinearLayout android:orientation="horizontal" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="56.0dip">
<ImageView android:id="@id/brightness_icon" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/tw_quickpanel_icon_brightness" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</LinearLayout>
So, I opened up the mod I was given decompiled SystemUI.apk and found that file. Changed that so that the information was added back in. Saved, recompiled (without errors) and threw the SystemUI.apk back into the zip and reflashed.
This broke my statusbar and wallpaper. Why?
I then tried signing it using signapk, which didn't work
I think you may find your answer in this thread I spotted
http://forum.xda-developers.com/showthread.php?t=1790782
[Q] Help re decompiling/recompiling
Sent from my GT-I9300 using xda premium
I sorted it.
I wasn't signing properly.
To fix it I took the META-INF and AndroidManifest.xml from the original .apk, kept them save. Built the APK once, then stuck those two files in the build/apk folder and rebuilt/compiled. Worked fine after that.

HOW TO CHANGE COLOUR OF CLOCK IN STATUS BAR... (note:not status bar expanded)

you have a status bar,
And it got a clock,,,
BUT ALAS, when you try to change its colour
Da hell dude its in smali,, now i have to handle like a thousand lines of code and use google
^^DID YOU EVER FACE SUCH A SITUATION,,, well then,, here comes mvsdroid to enable you to edit the clock text features
with xmls only so dont rot in the SMALI FILES (the horror)
----all u need is ur brain and a tool to work on apks----
1) Decompile SystemUI.apk
2) Open res/layout/Status_bar.xml
3) You will see this
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textColor="#ff33b5e5" android:gravity="left|center" androidaddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
kick this line with the delete button and in place of that paste this
<com.android.systemui.statusbar.policy.DigitalClock android:id="@id/clock" android:background="#ee000000" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="0.0dip" android:layout_alignParentRight="true">
<TextView android:textSize="16.0dip" android:textColor="#ff33b5e5" android:ellipsize="none" android:gravity="Right" android:id="@id/timeDisplayBackground" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textSize="16.0dip" android:textColor="#ff33b5e5" android:ellipsize="none" android:gravity="Right" android:id="@id/timeDisplayForeground" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
</com.android.systemui.statusbar.policy.DigitalClock>
Now since u have added that android:id attribute,, that cool piece of text shall help us change whatever we want,,,
Now there are two android:textColor attributes...
Find em and change it to whatever hex code you want,, means like if you want ICS BLUE,, make them android:textColor="#ddff00"
and similarly change the size attributes,, so now next time you want that clock to obey ur command,, you dont need no smali!!!!!!
4) Now download the digital clock smali i am giving and place it in systemUI/smali\com\android\systemui\statusbar\policy
5) Then save it and close it
Now download the digital clock smali i am giving and place it in systemUI/smali\com\android\systemui\statusbar\policy
6) Recompile properly
7) Have fun
8) If you had fun in step 6,, press thanks button
<---- dont just see this and laugh,, Press thanks if you like it
STILL ,,, post a reply,, I am still alive to help
I think have to add digitalclock smali?
Sent from my GT-S5360 using Tapatalk 2
Well bro............. NO NEED
Its already there,,,, thats the good thing,,,, maybe samsung wanted an expanded clock and then threw the option but did not delete the smali!!!!
What firmware?
Sent from my GT-S5360 using Tapatalk 2
Well bro.............
the smali part is needed only if you are using stock rom,, but most roms have that already,, but thankyou,,, i will add that too!!!!!!!!!!!!!!!!!!
Nice guide
Sent from my GT-S5360 using Tapatalk 2
Nice...
Regards,
Ganesh
mvsdroid said:
you have a status bar,
And it got a clock,,,
BUT ALAS, when you try to change its colour
Da hell dude its in smali,, now i have to handle like a thousand lines of code and use google
^^DID YOU EVER FACE SUCH A SITUATION,,, well then,, here comes mvsdroid to enable you to edit the clock text features
with xmls only so dont rot in the SMALI FILES (the horror)
----all u need is ur brain and a tool to work on apks----
1) Decompile SystemUI.apk
2) Open res/layout/Status_bar.xml
3) You will see this
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textColor="#ff33b5e5" android:gravity="left|center" androidaddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
kick this line with the delete button and in place of that paste this
<com.android.systemui.statusbar.policy.DigitalClock android:id="@id/clock" android:background="#ee000000" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="0.0dip" android:layout_alignParentRight="true">
<TextView android:textSize="16.0dip" android:textColor="#ff33b5e5" android:ellipsize="none" android:gravity="Right" android:id="@id/timeDisplayBackground" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textSize="16.0dip" android:textColor="#ff33b5e5" android:ellipsize="none" android:gravity="Right" android:id="@id/timeDisplayForeground" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
</com.android.systemui.statusbar.policy.DigitalClock>
Now since u have added that android:id attribute,, that cool piece of text shall help us change whatever we want,,,
Now there are two android:textColor attributes...
Find em and change it to whatever hex code you want,, means like if you want ICS BLUE,, make them android:textColor="#ddff00"
and similarly change the size attributes,, so now next time you want that clock to obey ur command,, you dont need no smali!!!!!!
4) Now download the digital clock smali i am giving and place it in systemUI/smali\com\android\systemui\statusbar\policy
5) Then save it and close it
Now download the digital clock smali i am giving and place it in systemUI/smali\com\android\systemui\statusbar\policy
6) Recompile properly
7) Have fun
8) If you had fun in step 6,, press thanks button
<---- dont just see this and laugh,, Press thanks if you like it
STILL ,,, post a reply,, I am still alive to help
Click to expand...
Click to collapse
Nice...
that is not how you thank someone in xda bro,,,
salizzan said:
Nice...
Click to expand...
Click to collapse
DOnt say IT,,, PRess it

[Q] Theming .xml (<TextView/>)

Hello, I'm trying to mod this line, in order to change the text colour.
Code:
<TextView android:layout_gravity="center_horizontal" android:id="@id/due_date" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@android:style/TextAppearance.Material.Caption" />
Is it possible to override the text color of style="@android:style/TextAppearance.Material.Caption" to a custom one, without editing neither the framework-res.apk, nor styles.xml of the app itself? I have tried to add the needed line (android:textColor="#ffffffff") in a variety of positions, but I'm not sure if this is the problem. Can you help me?
NFS_FM said:
Hello, I'm trying to mod this line, in order to change the text colour.
Code:
<TextView android:layout_gravity="center_horizontal" android:id="@id/due_date" android:layout_width="wrap_content" android:layout_height="wrap_content" style="@android:style/TextAppearance.Material.Caption" />
Is it possible to override the text color of style="@android:style/TextAppearance.Material.Caption" to a custom one, without editing neither the framework-res.apk, nor styles.xml of the app itself? I have tried to add the needed line (android:textColor="#ffffffff") in a variety of positions, but I'm not sure if this is the problem. Can you help me?
Click to expand...
Click to collapse
Is that a xml from layout folder or? if so post the full xml so I can see or just pm me I will help you
SICKMADE said:
Is that a xml from layout folder or? if so post the full xml so I can see or just pm me I will help you
Click to expand...
Click to collapse
The line is from an .xml from the layout folder. You may download the full .xml from here, and the lines I am interested in are 8, 12 and 13. Thank you.

Categories

Resources