Jump to content


Photo

Allign Lock Screen Text To Center

- - - - -

  • Please log in to reply
7 replies to this topic

#1
Soni-96z

Soni-96z

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Devices:Huawei Ascend G300
help me please, dont know how to do it.

  • 0

#2
KonstaT

KonstaT

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,680 posts
  • Gender:Male
  • Location:Finland
  • Devices:Moto G, ZTE Open C
  • Twitter:@konstatuomio
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.

  • 1

#3
Soni-96z

Soni-96z

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Devices:Huawei Ascend G300

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.

  • 0

#4
Soni-96z

Soni-96z

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Devices:Huawei Ascend G300
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.

  • 0

#5
Soni-96z

Soni-96z

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Devices:Huawei Ascend G300
Bump

  • 0

#6
KonstaT

KonstaT

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,680 posts
  • Gender:Male
  • Location:Finland
  • Devices:Moto G, ZTE Open C
  • Twitter:@konstatuomio
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

#7
karololszak

karololszak

    Regular

  • Members
  • PipPip
  • 72 posts
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

FREE BITCOINS! Yes, we give away bitcoins for absolutely free! Check it out!


#8
Soni-96z

Soni-96z

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Devices:Huawei Ascend G300

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, 25 February 2012 - 07:17 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users