[Sony Cross-Device General] abo hani:
Hello There ... And Welcome to my new GUIDE :D

What is this guide for ? Explain please :)

Guide Explain : You will make a section in Settings.apk and add what ever you want :)

Sample :

Note 1 : You Need to know how to decompile & compile ... See Here Pree Me

Note 2 : Download "Honami.xml" sample , Press Me .

..: Additional Edit :..​

..: First Part :..​

Adding Section id .​

Go to res/values , and open ids.xml .

Go to last line , and add this :

<item type="id" name="honami">false</item> Change "honami" to section id name ...."you ROM name" whatever you want ... but without BIG LETTERS !! & spaces ! .​

​

Photo :

​

..: Second Part :..

Adding Section name .

Go to res/values , and open strings.xml .

Go to last line , and add this :

<string name="honami_category">Personalization</string> replace between > < with your section name .

Photo :

​

..: Third Part :..

Adding Section icon .​

Go to res/drawable-xhdpi and add icon with 72 x 72 .... and name it as you want without BIG LETTERS & Spaces !!

Photo :

​

=============​

..: Adding Section :..​

Ok ... Lets begin the hard work :D

First Thing see highlighted text ...

This is the section ....

Lets start ... Go to res/xml/settings_headers.xml

open it and see above " <header android:title="@string/header_category_advanced" /> "

Add this code

This is " Section Code "

Ok for now .. we named the "Section" and we put an 'id" for it ... and we added an "icon" for it ...

Now we have to name the "Section Header"

Go to res/values/strings.xml

open it and go to the last line ... and add this :

Change between > < to whatever you want ...

Photo :

​

and go back to "Settings_Headers.xml" and add this code above "Section Code" :

<header android:title="@string/header_name" />

We have named the "header" now its time to edit the "Section Code"

android:icon="@drawable/honami" change after " / " with section icon name that you have added .

android:id="@id/honami" change after " / " with section id that you have added .

android:title="@string/honami_category1" chnage after " / " with section name ... section name not header name ! that you have added in Strings.xml .

android:value="honami" change after " / " with section code ... like i named it honami ... name it what ever code you want ... :)​

​

Photo :

​

=============
​

..: Adding Apps in Section :..​

Ok .... We are going to make section.xml file .... to put apps in it ...

You Remember that we put "id + name" those id + name for section.xml ....

So now lets start :)

I put a download link for sample.xml .... :) copy it and move it to xml folder ... and rename it to "id name" that you put in "values/ids.xml" file .

Now ... what to edit ?

<com.sonymobile.settings.preference.PreferenceCategory android:title="@string/honami_apps_section1">

This is Section name .... first section name ...

You should add it to strings ... so go to strings.xml and add this code to the last line :

<string name="honami_apps_section1">Change it to apps section name</string> change it to whatever you want .

<com.sonymobile.settings.preference.IntentPreference android:icon="@drawable/ic_sms" android:title="@string/app titl

<intent android:targetPackage="app package" android:action="android.intent.action.MAIN" android:targetClass="app activty" />

android:icon ... this is "app icon" ... you must add icon for the app .... add it to "drawable-xhdpi" folder ..

So .. change "ic_sms" to icon name ...

android:title .. this is app name ... as i explained above ... you must add string code to strings.xml .

android:targetPackage ... this is app package ... to know it .. you must decompile the app you want to add in the section ...

you will see it in AndroidMainFest.xml file ....

android:targetClass ... this is app activity ... it may be like "com.blabla.bla.MainActivity"

Or like this ".MainActivity"

If it like the second way ... you need to add "App package before it"

Example : "apppackage.mainactivity" ===> "com.blabla.bla.mainactivity" .

<com.sonymobile.settings.preference.PreferenceCategory android:title="@string/honami_category2">

this is second apps section ... mode it as above ...

if you want only one section !

Delete this :

If you want another section ...copy this ...

And replace "string/honami_category2" with "string/honami_category3"

Photo :​

​

=============​

Another Related Guide ... you can try "How to add logo in About Phone" method .. and add logo to the section ...

See the Guide here : Press Me