[Galaxy S II General] Tired Storeman:
Centered Settings Headers

PLEASE MAKE A BACKUP BEFORE YOU START

I made this tutorial for Alliance Rom users a few months back, but should work on any JB 4.1.2 rom.

Step 1. On your phone, in system/framework make a new folder and name it Frame.

Step 2. On your desktop make a new folder and name it Center,open it and leave open

Step 3. Obtain framework-res.apk from your phone, NOT FROM UNZIPED ROM ON YOU COMPUTER by ether pulling with adb or copy from system/framework with Root Explorer to your desktop

Step 4. Decompile framework-res.apk

Step 5. Open the decompiled framework-res folder

Step 6. Open the res folder

Step 7. Open the values folder

Step 8. Open the styles xml file with what ever you use to open xml files (I use Notepad++)

Step 9. Search for

<style name="Widget.DeviceDefault.TextView.ListSeparator" parent="@style/Widget.Holo.TextView.ListSeparator">

You need to edit the folowing

<style name="Widget.DeviceDefault.TextView.ListSeparator" parent="@style/Widget.Holo.TextView.ListSeparator">
<item name="textSize">17.0dip</item>
<item name="textStyle">normal</item>
<item name="textColor">#ffd2d2d2</item>
<item name="background">@drawable/tw_list_section_divider_holo_dark</item>
<item name="paddingLeft">16.0dip</item>
<item name="textAllCaps">false</item>
</style>

Your file might look slightly different, i have changed the text color.

Step 10. Add .

<item name="gravity">center</item>

After

<item name="textColor">#ffd2d2d2</item>

Ending up with

<style name="Widget.DeviceDefault.TextView.ListSeparator" parent="@style/Widget.Holo.TextView.ListSeparator">
<item name="textSize">17.0dip</item>
<item name="textStyle">normal</item>
<item name="textColor">#ffd2d2d2</item>
[COLOR=Red]<item name="gravity">center</item>[/COLOR]
<item name="background">@drawable/tw_list_section_divider_holo_dark</item>
<item name="paddingLeft">16.0dip</item>
<item name="textAllCaps">false</item>
</style>

Here you can also change the text color and size if you want,

You can also change the textStyle from normal to bold, if you want bold text

or change textAllCaps from false to true if you want All Capital text.

Step 11. Save changes.

Step 12. Compile framework-res.apk. (you should not recieve any errors)

Step 13. Open the folder where it was compiled to (in Apktool it is the build/apk folder).

and replace the META-INF folder and the AndroidManifest.xml file from this folder with the META-INF folder and the AndroidManifest.xml file

from the original framework-res.apk, that you placed on your desktop.

Step 14. Compile framework-res.apk again. (again you should not recieve any errors)

You need to do the following steps to avoid bootloop

Step 15. Open the compiled framework-res.apk DO NOT UNZIP IT. (in Apktool.it is in the dist folder)

Drag the

assets

META-INF

res

AndroidManifest.xml

resources.arsc

folders and files into the previously opened Center folder which you created on your desktop.

Step 16. If it is not already opened, open the Center folder

Step 17. Highlight all of the folders and files in the Center folder and right click on them(if using windows) and click add to archive (i am using Winrar)

In the window that pops up for Archive Format use Zip

and compression method use Store

Change Archive name to framework-res.apk

and hit ok.

Step 18. Once framework-res.apk has been made, push to phone

Step 19. Set permissions to rw-r--r--

If phone bootloops, restore backup and try again

The above steps will have no effect on the ported S4 Tabbed Settings.

Screenshot 1 Centered text normal

Screenshot 2 Centered text bold

Screenshot 3 Centered text All Capitals