help me please, dont know how to do it.
Allign Lock Screen Text To Center
Started by
Soni-96z
, Feb 23 2012 05:15 PM
#1
Posted 23 February 2012 - 05:15 PM
#2
Posted 23 February 2012 - 06:07 PM
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, 23 February 2012 - 06:08 PM.
ZTE Blade:
CyanogenMod 10.1 - KonstaKANG (Android 4.2.2) - ClockWorkMod 6.0.2.7
CyanogenMod 10 - KonstaKANG (Android 4.1.2)
CyanogenMod 9 - KonstaKANG (Android 4.0.4)
Swedish Snow RLS7 (Android 2.3.5)
ZTE Blade III:
CyanogenMod 10.1 - KonstaKANG (Android 4.2.2) - ClockWorkMod 6.0.3.2
CyanogenMod 10 - KonstaKANG (Android 4.1.2)
Aurora Borealis RLS1 (Android 4.0.4)
Firefox OS - Ubuntu Touch
#3
Posted 23 February 2012 - 08:08 PM
KonstaT, on 23 February 2012 - 06:07 PM, said:
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, 23 February 2012 - 09:15 PM.
#4
Posted 23 February 2012 - 09:16 PM
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, 23 February 2012 - 09:24 PM.
#5
Posted 23 February 2012 - 09:17 PM
Bump
#6
Posted 23 February 2012 - 09:55 PM
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.
No problems with SS RLS4b framework-res.apk.
ZTE Blade:
CyanogenMod 10.1 - KonstaKANG (Android 4.2.2) - ClockWorkMod 6.0.2.7
CyanogenMod 10 - KonstaKANG (Android 4.1.2)
CyanogenMod 9 - KonstaKANG (Android 4.0.4)
Swedish Snow RLS7 (Android 2.3.5)
ZTE Blade III:
CyanogenMod 10.1 - KonstaKANG (Android 4.2.2) - ClockWorkMod 6.0.3.2
CyanogenMod 10 - KonstaKANG (Android 4.1.2)
Aurora Borealis RLS1 (Android 4.0.4)
Firefox OS - Ubuntu Touch
#7
Posted 24 February 2012 - 05:44 PM
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
Quote
the framework is from "update-cm-7.2.0-RC0-Blade-KANG-20FEB-v1-BurgerZ "
That's why we love CyanogenMod - there is an option for almost everything
Although it's in polish, feel free to visit my website: Blog Karola Olszackiego.
NoweBrzmienie.PL - strona poświęcona EDM: electro, dance, house, dubstep i drum & bass!
NoweBrzmienie.PL - strona poświęcona EDM: electro, dance, house, dubstep i drum & bass!
#8
Posted 25 February 2012 - 06:32 PM
karololszak, on 24 February 2012 - 05:44 PM, said:
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
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, 25 February 2012 - 07:17 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users







Sign In
Create Account

Back to top










