Soni-96z

Allign Lock Screen Text To Center

8 posts in this topic

Extract /system/framework/framework-res.apk from your ROM. Decompile framework-res.apk with apktool. Edit /res/layout/keyguard_screen_tab_unlock.xml. Edit each TextView line that you want to center. Replace android:layout_marginLeft/Right=?? with android:layout_centerInParent="true". Compile modified framework-res with apktool. Sign and push to phone.

Edited by KonstaT
1

Share this post


Link to post
Share on other sites

Extract /system/framework/framework-res.apk from your ROM. Decompile framework-res.apk with apktool. Edit /res/layout/keyguard_screen_tab_unlock.xml. Edit each TextView line that you want to center. Replace android:layout_marginLeft/Right=?? with android:layout_centerInParent="true". Compile modified framework-res with apktool. Sign and push to phone.

i love you man,thank you helped alot :)

EDIT: im getting an error message when i go to compile after i follow your instructions

bellow is the error, i censored out my name with dashes.

C:\Users\------- \Desktop\tools\apktool>java -jar apktool.jar b framework-res

_decompiled

W: Could not find sources

I: Checking whether resources has changed...

I: Building resources...

C:\Users\------- \Desktop\tools\apktool\framework-res_decompiled\res\layout\k

eyguard_screen_tab_unlock.xml:6: error: Error parsing XML: duplicate attribute

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce

ption: could not exec command: [aapt, p, -F, C:\Users\------- \AppData\Local\Tem

p\APKTOOL7354584562401790998.tmp, -x, -S, C:\Users\------- \Desktop\tools\apk

tool\framework-res_decompiled\res, -M, C:\Users\------- \Desktop\tools\apktoo

l\framework-res_decompiled\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav

a:193)

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)

at brut.androlib.Androlib.buildResources(Androlib.java:248)

at brut.androlib.Androlib.build(Androlib.java:171)

at brut.androlib.Androlib.build(Androlib.java:154)

at brut.apktool.Main.cmdBuild(Main.java:174)

at brut.apktool.Main.main(Main.java:59)

Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U

sers\------\AppData\Local\Temp\APKTOOL7354584562401790998.tmp, -x, -S, C:\User

s\-------\Desktop\tools\apktool\framework-res_decompiled\res, -M, C:\Users\-

-------\Desktop\tools\apktool\framework-res_decompiled\AndroidManifest.xml]

at brut.util.OS.exec(OS.java:83)

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav

a:191)

... 6 more

C:\Users\------- \Desktop\tools\apktool>

Edited by Soni-96z
0

Share this post


Link to post
Share on other sites

if it is of any use to anyone the framework is from "update-cm-7.2.0-RC0-Blade-KANG-20FEB-v1-BurgerZ "

Edited by Soni-96z
0

Share this post


Link to post
Share on other sites

Error message says that you have a duplicate attribute. You can't have something centered and aligned from left/right at the same time. You need to replace android:layout_marginLeft="??dip" or android:layout_marginRight="??dip" with android:layout_centerInParent="true" on every line you want to center.

No problems with SS RLS4b framework-res.apk.

0

Share this post


Link to post
Share on other sites

If you want to change that in

the framework is from "update-cm-7.2.0-RC0-Blade-KANG-20FEB-v1-BurgerZ "
there's no need to edit the apk - you can do it from under CyanogenMod settings! I'm translating from Polish, but it should be something like Settings -> CyanogenMod Settings -> Lock screen -> Widget settings (the second option in the menu) -> Placement of widgets (second option again, under it it says something about clock, date, network, status) and there you can choose it to be default, hidden or centered.

That's why we love CyanogenMod - there is an option for almost everything ;)

1

Share this post


Link to post
Share on other sites

If you want to change that in there's no need to edit the apk - you can do it from under CyanogenMod settings! I'm translating from Polish, but it should be something like Settings -> CyanogenMod Settings -> Lock screen -> Widget settings (the second option in the menu) -> Placement of widgets (second option again, under it it says something about clock, date, network, status) and there you can choose it to be default, hidden or centered.

That's why we love CyanogenMod - there is an option for almost everything ;)

oh damn, didn't know they had included these options. thanks for the help guys.

is there anyway to lower the height of the text in cyanogenmod settings?

Edited by Soni-96z
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2016. MoDaCo uses IntelliTxt technology.