[Sony Cross-Device Development Themes and Apps] abo hani:
Hello & Good Morning, As Usual, Here's a new -maybe a wanted guide by ROMs Cookers-, For Xperia Launcher, In this guide i'm gonna explain how to replace stage icons ( Google Folder, Phonebook..etc) with your own shortcuts, same for Desktop, So What are you waiting for ? Let's Rock n Roll !

*Extra Explain : By This Guide, You Will Set Default Custom Launcher Settings, Just Like Default Shortcuts When You Flash A New ROM.

Don't forget me from the Credits :laugh: .​

What Are You Going To Learn :

Editing Desktop Pages Number.

Setting Up Your Default Desktop Page .

Replacing Stage Icons, And Creating Folder / Your Own Custom Apps Shortcuts .

Replace Desktop Shortcuts / Widgets, With Your Own Shortcuts / Widgets .

Setup the place of those Desktop Shortcuts / Widgets x,y .

Notes :

Apptray Apps Default Icons Modding Is just like Desktop, But without "x,y" stuff, open the file and you will understand it.

Useful Links :

How To Master Dock Icons / Desktop & Apptray Grid Modding .

Part 1 - Editing Desktop Pages :

Navigate to res/values, Open integers.xml .

Search for "number_of_desktop_pages", Modify the value, I Recommend making it "3" .

Part 2 - Setting Up Your Default Desktop Page :

Navigate to res/values, Open integers.xml .

Search for "default_desktop_home_page", Modify the value, I Recommend making it "2" if you selected 3 pages .

Part 3 - Replacing Stage Icons, And Creating Folder / Your Own Custom Apps Shortcuts :

Now, It's time for hard work, Navigate to res/xml, Open default_settings_stage.xml .

Replace The Content With the following :

<?xml version="1.0" encoding="utf-8"?>
<settings version="1">
<groups type="stage">
<group>
<groups type="folders">
<group>
<setting key="name">Folder</setting>
<setting key="id">Folder</setting>
</group>
</groups>
<groups type="activities">
<group>
<setting key="name">app_activity</setting>
<setting key="package-name">app_package</setting>
<setting key="folder">Folder</setting>
</group>
<group>
<setting key="name">app_activity</setting>
<setting key="package-name">app_package</setting>
</group>
</groups>
</group>
</groups>
</settings>

Now, This is our Example template, I Will make an example of adding a folder Named " AboHani ", With Google Chrome Inside it, Plus i will an app shortcut beside it .

Let's Modify the "type="folders", This section define the folders, if you want to add a folder, keep it, if not delete it .

<setting key="name">Abo Hani's Apps</setting>
<setting key="id">myfolderid</setting>

We Made our First folder info, Now let's Add App in it & Add an app shortcut .

In Groups " activities ", We Need to Modify it, And here's an example, First Lines must be folder apps, It means, if i want to add " google chrome " i must put it's code in the first, After it you can add your standalone app shortcut .

Let's make an example, Shall we ?

<groups type="activities">
<group>
<setting key="name">com.google.android.apps.chrome.Main</setting>
<setting key="package-name">com.android.chrome</setting>
<setting key="folder">myfolderid</setting>
</group>
<group>
<setting key="name">.mainactivity</setting>
<setting key="package-name">abohani.app.package</setting>
</group>
</groups>

Now it's time for explains :

Just like i said, You need to add the folder app in the first line, And as you noticed I've put the same "folder Id", So the Launcher can know in which folder is this app included ?

For Apps Shortcuts Which are not included in the folder, You must delete the " folder " line .

"name", in this field you need to add App Activity, You will find it in AndroidManiFest.xml, in 2 ways, either as " .MainActivity", or "package.MainActivity ", it depends on the APK .

"package-name", in this field you need to add App Package, easy .. right ?

Finally, There are 2 Main Sections, " Folders " & " Activities ", IF you want to add a folder, keep folders section, if not delete it.

Don't forget the tags, Those " <blabla> </blabla> ", As you have seen, every app got it's own tags, start & ending, Therefor every app got one tag, so you can't add " <blabla><blabla> " .

Part 4 - Desktop Apps Shortcuts & Widgets :

Notes For Starting :

3 Main Sections, " widgets " / " advanced widgets " / " activities " .

Widgets x,y are : Rows & Columns, width & height = self explained .

Activities x,y are : Rows & Columns Place.

Advanced Widgets are not needed, they are for Sony Widgets, So the provided template, is simple & for global widgets like Weather or any widget you wanna add.

Let's Start!, Navigate to res/xml, Open default_settings_desktop.xml .

Replace with this Example template :

<?xml version="1.0" encoding="utf-8"?>
<settings version="1">
<groups type="desktop">
<group>
<groups type="widgets">
<group>
<setting key="package-name">widgetpackage</setting>
<setting key="name">mywidget</setting>
<setting key="width">4</setting>
<setting key="height">2</setting>
<setting key="x">0</setting>
<setting key="y">0</setting>
<setting key="pane">2</setting>
</group>
</groups>
</groups>
<groups type="activities">
<group>
<setting key="name">appmainactivity</setting>
<setting key="package-name">myapppackage</setting>
<setting key="x">3</setting>
<setting key="y">3</setting>
<setting key="pane">2</setting>
</group>
</groups>
</group>
</groups>
</settings>

Now, it's time for explains :

Pane : In Which Pane-Page is this Widget/App ?

Y : Column Number ( Check integers.xml for Columns Number ) .

X : Row Number ( Check integers.xml for Rows Number ) .

Height - Widget : Self Explained .

width - Widget : Self Explained .

Name : Explained it previously .

Package-Name : Explained it previously .

So, IF you want to add a Widget, add it in " Widgets " section, And set the settings of it .

IF you want to add an app, Add it in " Activities " section, Adn set the settings of it .

IF you want add a folder, Go down and see " Final Notes " .

IF you want to add an app inside a folder in Desktop Pages, Same as Stage Modding, Add the " folder " line in last, And don't forget to modify the "folder_id", it must match the folder id .

Final Notes :

IF You want to add " Folder ", Copy the folder group type, And add " folder " line in activities section .

IF You want to add 2 folders, duplicate the folder, same way .. easy .

Apptray & Desktop & Stage Shortcuts Modding are simple & nearly the same, just for Desktop there are " x,y " & " height & width " for widgets .