[MOD][GUIDE] ICS+ Tabbed settings(MIUI Like)

Search This thread

Nathan Ali Ashari

Senior Member
Jan 31, 2013
151
327
jakarta
So you are on a stock firmware? If so, I would guess that the other packages are not signed with the same keys I linked to since its a stock ROM and not asop. The only thing you can do then is to attempt to re-sign every system apk/jar with a new signature(which I've never been successful at doing).

And the mainsetting will only show up in the public xml AFTER you compile it, then decompile it again. The only reason it wouldnt show up is if you are not placing the files i posted in the correct directories or not recompiling/decompiling when I said to.

yes stock firmware , and my room deodex , and setting it after the first recompile, before his 9MB size .. and what should I do?
 

joeyhuab

Recognized Developer
Did you set permissions correctly?

I did. Set them to RW-R--R-- and then rebooted. It only loads when the header texts are left or even without text, just the tabs. But once I put the items, it starts to force close. :) It would be of great help if you could upload yours so that I may check the codes and compare with mine. :) Thanks!
 

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
PersonalSettings$HeaderAdapter

Get Nullpointer exceptions because apparently PersonalSettings$HeaderAdapter has a lot of public values that were not included on the OP guide.
If you could please provide source or base stock deodexed (thread link) this was based on, it would be appreciated greatly. :D

Edit: Same applies to:
DeviceSettings$HeaderAdapter.smali
AppSettings$HeaderAdapter.smali
 
Last edited:

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
Get Nullpointer exceptions because apparently PersonalSettings$HeaderAdapter has a lot of public values that were not included on the OP guide.
If you could please provide source or base stock deodexed (thread link) this was based on, it would be appreciated greatly. :D

Edit: Same applies to:
DeviceSettings$HeaderAdapter.smali
AppSettings$HeaderAdapter.smali

+1

Sent from my GT-I8150 using xda app-developers app
 

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
Additional Instructions

The following is direction from BigSplit. Please be sure the thank him wherever possible for this work.
This is an addendum to the instructions on the OP which you still need to follow. I have added additional notes here in Green.
If something is not clear, please ask that I may update the notes.
Cheers - TD

Additional Porting Instructions

1. I would make sure you just have blank XML's for the lists of settings to start with(this will make it easier to debug).

2. AppSettings.smali, DeviceSettings.smali and PersonalSettings.smali files are all based off of Settings.smali. Settings.smali may be named differently in a non-asop based ROM or a custom ROM, but its the smali the displays the list of all settings.

3. Knowing this, you would replace all AppSettings.smali & AppSettings$xxx.smali(the sub-classes) with copies of Settings.smali and Settings$xxx.smali files to make sure those files contain the exact functionality you need for your ROM.
- This means making copies of the Settings smali files and renaming them. For me this was ONLY the files Settings.smali, Settings$1.smali, Settings$2.smali, Settings$HeaderAdapter.smali, Settings$HeaderAdapter$HeaderViewHolder.smali

4. Within the AppSettings.smali and subclasses you would need to replace ALL occurrences of "com/android/settings/Settings"(or whatever its named) with "com/android/settings/AppSettings"(to ensure all calls are pointing to the correct paths).
- Pay attention! Not ALL occurences. For instance see the following excerpt from new AppSettings.smali that references other subsets of settings that I do not want to rename (note #annotations section):
.class public Lcom/android/settings/AppSettings;
.super Landroid/preference/PreferenceActivity;
.source "Settings.java"

# interfaces
.implements Landroid/accounts/OnAccountsUpdateListener;
.implements Lcom/android/settings/ButtonBarHandler;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/settings/Settings$CustomizableKeySettingsActivity;,
Lcom/android/settings/Settings$HomeSettingsActivity;,
Lcom/android/settings/Settings$WimaxSettingsActivity;,
Lcom/android/settings/Settings$GlobalRoamingSettingsActivity;,
Lcom/android/settings/Settings$NfcSettingsActivity;,
Lcom/android/settings/Settings$PowerSettingsActivity;,
Lcom/android/settings/Settings$DormantmodeSettingsActivity;,
Lcom/android/settings/Settings$EasyModeSettingsActivity;,
Lcom/android/settings/Settings$PenSettingsMenuActivity;,
Lcom/android/settings/Settings$SoftwareUpdateSettingActivity;,
Lcom/android/settings/Settings$AllShareCastSettingsActivity;,
Lcom/android/settings/Settings$DualClockSettingActivity;,
Lcom/android/settings/Settings$SBeamSettingsActivity;,
Lcom/android/settings/Settings$NearbySettingsActivity;,
Lcom/android/settings/Settings$AndroidBeamSettingsActivity;,
Lcom/android/settings/Settings$TextToSpeechSettingsActivity;,
Lcom/android/settings/Settings$AdvancedWifiSettingsActivity;,
Lcom/android/settings/Settings$DataUsageSummaryActivity;,
Lcom/android/settings/Settings$DeviceAdminSettingsActivity;,
Lcom/android/settings/Settings$CryptSDCardSettingsActivity;,
Lcom/android/settings/Settings$CryptKeeperSettingsActivity;,
Lcom/android/settings/Settings$AccountSyncSettingsActivity;,
Lcom/android/settings/Settings$PowerUsageSummaryActivity;,
Lcom/android/settings/Settings$RunningServicesActivity;,
Lcom/android/settings/Settings$DockSettingsActivity;,
Lcom/android/settings/Settings$PrivacySettingsActivity;,
Lcom/android/settings/Settings$LocationSettingsActivity;,
Lcom/android/settings/Settings$SecuritySettingsActivity;,
Lcom/android/settings/Settings$AccessibilitySettingsActivity;,
Lcom/android/settings/Settings$DevelopmentSettingsActivity;,
Lcom/android/settings/Settings$StorageUseActivity;,
Lcom/android/settings/Settings$ManageApplicationsActivity;,
Lcom/android/settings/Settings$DeviceInfoSettingsActivity;,
Lcom/android/settings/Settings$PowerSavingModeSettingsActivity;,
Lcom/android/settings/Settings$LockScreenSettingsActivity;,
Lcom/android/settings/Settings$LockscreenMenuActivity;,
Lcom/android/settings/Settings$DisplaySettingsActivity;,
Lcom/android/settings/Settings$SoundSettingsActivity;,
Lcom/android/settings/Settings$UserDictionarySettingsActivity;,
Lcom/android/settings/Settings$LocalePickerActivity;,
Lcom/android/settings/Settings$SpellCheckersSettingsActivity;,
Lcom/android/settings/Settings$KeyboardLayoutPickerActivity;,
Lcom/android/settings/Settings$InputMethodAndLanguageSettingsActivity;,
Lcom/android/settings/Settings$WifiP2pSettingsActivity;,
Lcom/android/settings/Settings$WifiApSettingsActivity;,
Lcom/android/settings/Settings$WifiSettingsActivity;,
Lcom/android/settings/Settings$StorageSettingsActivity;,
Lcom/android/settings/Settings$DateTimeSettingsActivity;,
Lcom/android/settings/Settings$VpnSettingsActivity;,
Lcom/android/settings/Settings$TetherSettingsActivity;,
Lcom/android/settings/Settings$WirelessSettingsActivity;,
Lcom/android/settings/Settings$BluetoothSettingsActivity;,
Lcom/android/settings/Settings$HeaderAdapter;
}
.end annotation

Annotation section DOES need to be modified in the new sub files (with the $ in filename).
See additional note here about this section in the other files:
http://xdaforums.com/showpost.php?p=45845219&postcount=108

5. Now open up your 'res/values/public.xml'(YOUR ORIGINAL ROMS) and find the resource ID for 'settings_headers' or the name of the xml where your settings are normally stored.

6. THIS MUST BE DONE AFTER YOU COMPILE/DECOMPILE(read original tutorial). Find the resource ID for "app_settings_headers" in the public XML.

7. Now that you have both ID's, search all AppSettings.smali and subclasses for the ORIGINAL(settings_headers) ID and replace all occurrences with the ID for "app_settings_headers".

8. Repeat steps 4-7 with the DeviceSettings.smali and PersonalSettings.smali files and finish following the tutorial.

9 I would not add any items to the XML files until you have it working with swiping between 3 blank tabs.

Important Note about the settings.zip available on the OP:

The only smali files I used from the zip you should need are smali/com/android/settings/mainsetting smali files.
This only applies to the smali section, the files for the main apk are still fine to use.


Addendum:
- Also see these posts:
http://xdaforums.com/showpost.php?p=40919671&postcount=38
http://xdaforums.com/showpost.php?p=41075332&postcount=44
- Added a set of completed secsettings/res/xml files for download. They are for example only. Yours will be different when it is completed.
 

Attachments

  • AIO_2013-4-30-15-54-13.jpg
    AIO_2013-4-30-15-54-13.jpg
    22.3 KB · Views: 751
  • AIO_2013-4-30-15-53-12.jpg
    AIO_2013-4-30-15-53-12.jpg
    23.7 KB · Views: 647
  • AIO_2013-4-30-15-53-11.jpg
    AIO_2013-4-30-15-53-11.jpg
    24.1 KB · Views: 590
  • Example.res.xmls.zip
    4.5 KB · Views: 394
Last edited:

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
The following is direction from BigSplit. Please be sure the thank him wherever possible for this work.
This is an addendum to the instructions on the OP which you still need to follow. I have added additional notes here in Green.
If something is not clear, please ask that I may update the notes.
Cheers - TD

Additional Porting Instructions

1. I would make sure you just have blank XML's for the lists of settings to start with(this will make it easier to debug).

2. AppSettings.smali, DeviceSettings.smali and PersonalSettings.smali files are all based off of Settings.smali. Settings.smali may be named differently in a non-asop based ROM or a custom ROM, but its the smali the displays the list of all settings.

3. Knowing this, you would replace all AppSettings.smali & AppSettings$xxx.smali(the sub-classes) with copies of Settings.smali and Settings$xxx.smali files to make sure those files contain the exact functionality you need for your ROM.
- This means making copies of the Settings smali files and renaming them. For me this was ONLY the files Settings.smali, Settings$1.smali, Settings$2.smali, Settings$HeaderAdapter.smali, Settings$HeaderAdapter$HeaderViewHolder.smali

4. Within the AppSettings.smali and subclasses you would need to replace ALL occurrences of "com/android/settings/Settings"(or whatever its named) with "com/android/settings/AppSettings"(to ensure all calls are pointing to the correct paths).
- Pay attention! Not ALL occurences. For instance see the following excerpt from new AppSettings.smali that references other subsets of settings that I do not want to rename (note #annotations section):
.class public Lcom/android/settings/AppSettings;
.super Landroid/preference/PreferenceActivity;
.source "Settings.java"

# interfaces
.implements Landroid/accounts/OnAccountsUpdateListener;
.implements Lcom/android/settings/ButtonBarHandler;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/settings/Settings$CustomizableKeySettingsActivity;,
Lcom/android/settings/Settings$HomeSettingsActivity;,
Lcom/android/settings/Settings$WimaxSettingsActivity;,
Lcom/android/settings/Settings$GlobalRoamingSettingsActivity;,
Lcom/android/settings/Settings$NfcSettingsActivity;,
Lcom/android/settings/Settings$PowerSettingsActivity;,
Lcom/android/settings/Settings$DormantmodeSettingsActivity;,
Lcom/android/settings/Settings$EasyModeSettingsActivity;,
Lcom/android/settings/Settings$PenSettingsMenuActivity;,
Lcom/android/settings/Settings$SoftwareUpdateSettingActivity;,
Lcom/android/settings/Settings$AllShareCastSettingsActivity;,
Lcom/android/settings/Settings$DualClockSettingActivity;,
Lcom/android/settings/Settings$SBeamSettingsActivity;,
Lcom/android/settings/Settings$NearbySettingsActivity;,
Lcom/android/settings/Settings$AndroidBeamSettingsActivity;,
Lcom/android/settings/Settings$TextToSpeechSettingsActivity;,
Lcom/android/settings/Settings$AdvancedWifiSettingsActivity;,
Lcom/android/settings/Settings$DataUsageSummaryActivity;,
Lcom/android/settings/Settings$DeviceAdminSettingsActivity;,
Lcom/android/settings/Settings$CryptSDCardSettingsActivity;,
Lcom/android/settings/Settings$CryptKeeperSettingsActivity;,
Lcom/android/settings/Settings$AccountSyncSettingsActivity;,
Lcom/android/settings/Settings$PowerUsageSummaryActivity;,
Lcom/android/settings/Settings$RunningServicesActivity;,
Lcom/android/settings/Settings$DockSettingsActivity;,
Lcom/android/settings/Settings$PrivacySettingsActivity;,
Lcom/android/settings/Settings$LocationSettingsActivity;,
Lcom/android/settings/Settings$SecuritySettingsActivity;,
Lcom/android/settings/Settings$AccessibilitySettingsActivity;,
Lcom/android/settings/Settings$DevelopmentSettingsActivity;,
Lcom/android/settings/Settings$StorageUseActivity;,
Lcom/android/settings/Settings$ManageApplicationsActivity;,
Lcom/android/settings/Settings$DeviceInfoSettingsActivity;,
Lcom/android/settings/Settings$PowerSavingModeSettingsActivity;,
Lcom/android/settings/Settings$LockScreenSettingsActivity;,
Lcom/android/settings/Settings$LockscreenMenuActivity;,
Lcom/android/settings/Settings$DisplaySettingsActivity;,
Lcom/android/settings/Settings$SoundSettingsActivity;,
Lcom/android/settings/Settings$UserDictionarySettingsActivity;,
Lcom/android/settings/Settings$LocalePickerActivity;,
Lcom/android/settings/Settings$SpellCheckersSettingsActivity;,
Lcom/android/settings/Settings$KeyboardLayoutPickerActivity;,
Lcom/android/settings/Settings$InputMethodAndLanguageSettingsActivity;,
Lcom/android/settings/Settings$WifiP2pSettingsActivity;,
Lcom/android/settings/Settings$WifiApSettingsActivity;,
Lcom/android/settings/Settings$WifiSettingsActivity;,
Lcom/android/settings/Settings$StorageSettingsActivity;,
Lcom/android/settings/Settings$DateTimeSettingsActivity;,
Lcom/android/settings/Settings$VpnSettingsActivity;,
Lcom/android/settings/Settings$TetherSettingsActivity;,
Lcom/android/settings/Settings$WirelessSettingsActivity;,
Lcom/android/settings/Settings$BluetoothSettingsActivity;,
Lcom/android/settings/Settings$HeaderAdapter;
}
.end annotation


5. Now open up your 'res/values/public.xml'(YOUR ORIGINAL ROMS) and find the resource ID for 'settings_headers' or the name of the xml where your settings are normally stored.

6. THIS MUST BE DONE AFTER YOU COMPILE/DECOMPILE(read original tutorial). Find the resource ID for "app_settings_headers" in the public XML.

7. Now that you have both ID's, search all AppSettings.smali and subclasses for the ORIGINAL(settings_headers) ID and replace all occurrences with the ID for "app_settings_headers".

8. Repeat steps 4-7 with the DeviceSettings.smali and PersonalSettings.smali files and finish following the tutorial.

9 I would not add any items to the XML files until you have it working with swiping between 3 blank tabs.

Important Note about the settings.zip available on the OP:

The only smali files I used from the zip you should need are smali/com/android/settings/mainsetting smali files.
This only applies to the smali section, the files for the main apk are still fine to use.

Good job mate :D

Will you please share your settings :(


Sent from my GT-I8150 using xda app-developers app
 

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
Got it guys :good::laugh:


I QUOTED FROM OP :
"To overcome this on ASOP roms I download and sign system apks with the platfrom keys from CyanogenMod's android_build github. If everything goes well and you push the new signed apk to the system, your settings app should now look similar to this when you open it."


so you must signed with "platfrom keys from CyanogenMod's android_build github"

picture.php
 

Attachments

  • Screenshot_2013-05-01-14-49-54.jpg
    Screenshot_2013-05-01-14-49-54.jpg
    7.7 KB · Views: 225
Last edited:

BigSplit

Senior Member
Jan 7, 2012
549
818
- Pay attention! Not ALL occurences. For instance see the following excerpt from new AppSettings.smali that references other subsets of settings that I do not want to rename (note #annotations section):
.class public Lcom/android/settings/AppSettings;
.super Landroid/preference/PreferenceActivity;
.source "Settings.java"

# interfaces
.implements Landroid/accounts/OnAccountsUpdateListener;
.implements Lcom/android/settings/ButtonBarHandler;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/settings/Settings$CustomizableKeySettingsActivity;,
Lcom/android/settings/Settings$HomeSettingsActivity;,
Lcom/android/settings/Settings$WimaxSettingsActivity;,
Lcom/android/settings/Settings$GlobalRoamingSettingsActivity;,
Lcom/android/settings/Settings$NfcSettingsActivity;,
Lcom/android/settings/Settings$PowerSettingsActivity;,
Lcom/android/settings/Settings$DormantmodeSettingsActivity;,
Lcom/android/settings/Settings$EasyModeSettingsActivity;,
Lcom/android/settings/Settings$PenSettingsMenuActivity;,
Lcom/android/settings/Settings$SoftwareUpdateSettingActivity;,
Lcom/android/settings/Settings$AllShareCastSettingsActivity;,
Lcom/android/settings/Settings$DualClockSettingActivity;,
Lcom/android/settings/Settings$SBeamSettingsActivity;,
Lcom/android/settings/Settings$NearbySettingsActivity;,
Lcom/android/settings/Settings$AndroidBeamSettingsActivity;,
Lcom/android/settings/Settings$TextToSpeechSettingsActivity;,
Lcom/android/settings/Settings$AdvancedWifiSettingsActivity;,
Lcom/android/settings/Settings$DataUsageSummaryActivity;,
Lcom/android/settings/Settings$DeviceAdminSettingsActivity;,
Lcom/android/settings/Settings$CryptSDCardSettingsActivity;,
Lcom/android/settings/Settings$CryptKeeperSettingsActivity;,
Lcom/android/settings/Settings$AccountSyncSettingsActivity;,
Lcom/android/settings/Settings$PowerUsageSummaryActivity;,
Lcom/android/settings/Settings$RunningServicesActivity;,
Lcom/android/settings/Settings$DockSettingsActivity;,
Lcom/android/settings/Settings$PrivacySettingsActivity;,
Lcom/android/settings/Settings$LocationSettingsActivity;,
Lcom/android/settings/Settings$SecuritySettingsActivity;,
Lcom/android/settings/Settings$AccessibilitySettingsActivity;,
Lcom/android/settings/Settings$DevelopmentSettingsActivity;,
Lcom/android/settings/Settings$StorageUseActivity;,
Lcom/android/settings/Settings$ManageApplicationsActivity;,
Lcom/android/settings/Settings$DeviceInfoSettingsActivity;,
Lcom/android/settings/Settings$PowerSavingModeSettingsActivity;,
Lcom/android/settings/Settings$LockScreenSettingsActivity;,
Lcom/android/settings/Settings$LockscreenMenuActivity;,
Lcom/android/settings/Settings$DisplaySettingsActivity;,
Lcom/android/settings/Settings$SoundSettingsActivity;,
Lcom/android/settings/Settings$UserDictionarySettingsActivity;,
Lcom/android/settings/Settings$LocalePickerActivity;,
Lcom/android/settings/Settings$SpellCheckersSettingsActivity;,
Lcom/android/settings/Settings$KeyboardLayoutPickerActivity;,
Lcom/android/settings/Settings$InputMethodAndLanguageSettingsActivity;,
Lcom/android/settings/Settings$WifiP2pSettingsActivity;,
Lcom/android/settings/Settings$WifiApSettingsActivity;,
Lcom/android/settings/Settings$WifiSettingsActivity;,
Lcom/android/settings/Settings$StorageSettingsActivity;,
Lcom/android/settings/Settings$DateTimeSettingsActivity;,
Lcom/android/settings/Settings$VpnSettingsActivity;,
Lcom/android/settings/Settings$TetherSettingsActivity;,
Lcom/android/settings/Settings$WirelessSettingsActivity;,
Lcom/android/settings/Settings$BluetoothSettingsActivity;,
Lcom/android/settings/Settings$HeaderAdapter;
}
.end annotation

I was going to mention that you could keep a single copy of the member classes, but the last person I told about that working with a non-asop rom had a lot of trouble so I tried to keep it as simple as possible(still don't know if he ever got it working).

I'll add a link to your post in the OP
 

Adi Aisiteru Reborn

Senior Member
Apr 3, 2013
1,770
4,830
Bandar Lampung
I was going to mention that you could keep a single copy of the member classes, but the last person I told about that working with a non-asop rom had a lot of trouble so I tried to keep it as simple as possible(still don't know if he ever got it working).

I'll add a link to your post in the OP

But, I still got force close, when try to add the 3 empty XML :(


do you have suggestion Dev ?

EDIT : can you check my settings_header.xml : http://d-h.st/ddb
 
Last edited:

tdunham

Inactive Recognized Contributor
Jun 21, 2008
13,686
36,465
TampaBay
But, I still got force close, when try to add the 3 empty XML :(

do you have suggestion Dev ?

EDIT : can you check my settings_header.xml : http://d-h.st/ddb
I thought you had it working.
The reason that BigSplit states to use empty xml is because you will have trouble (I did) just copying sections from settings_headers.xml to blank xml.
I had to remove some items from the xml code for it to work (they were items disabled on my phone anyway) or settings would FC.
So by trial and error, I found which lines of code from settings_header.xml would work in the mod xml files by just using small sections of code at a time until I found line(s) that were causing problems.
If you are editing the empty xml files, a line also needs to be changed to correct syntax if you are trying to use it.
Here is a small example.

Empty xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<preference-headers
  xmlns:android="http://schemas.android.com/apk/res/android" />

Modified xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<preference-headers
  [COLOR="Red"]xmlns:android="http://schemas.android.com/apk/res/android">[/COLOR]
    <header android:title="@string/header_category_wireless_networks" />
    <header android:icon="@drawable/ic_settings_wireless" android:id="@id/wifi_settings" android:title="@string/wifi_settings_title" android:fragment="com.android.settings.wifi.WifiSettings" />
</preference-headers>
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 37
    lTTC3.png


    So I came across this thread a week or more back and implemented it in my ICS rom, but I wasn't happy with it(various reasons but mostly because it is gesture based). So I abandoned it. Fast forward a couple days, jumping from project to project, idea to idea and I somehow ended up porting the latest ICS version of ShenduOS. Then boom, the settings app was *almost* exactly what I wanted. It featured a more natural swiping from tab to tab, similar to most launchers.

    So I stripped the code for the tabs from the shendu settings app, stripped that code of any Shendu specific code and re-coded portions of the smali code so I could add it to the settings app of the ICS rom I use as my daily driver. What I ended up with is what seems to be something thats pretty generic and not rom specific.


    So now I share with you what *should* work with any ICS+ rom. This guide will be very similar to the one I linked to above.

    THIS SHOULD ALSO WORK ON OTHER DEVICES BUT I CANNOT TEST TO BE SURE

    Prerequisites:
    -experience decompiling/recompiling apk's with APKTool
    -experience signing apks
    -experience editing/theming apks

    I will not go into any of the above any more then just saying when to preform certain actions......

    GUIDE:

    1. First you will need to decompile the Settings.apk from your ROM with apktool

    2. Download the Settings.zip I attached to this post

    3. Unzip the Settings.zip and copy the 'res' and 'smali' folders to your decompiled Settings.apk folder(merge with existing folders of the same names)

    4. Open 'res/values/strings.xml' from the decompiled settings apk in your favorite text editor and add the following to the end of the list of strings...
    Code:
        <string name="personalized_setting">Personal</string>
        <string name="device_setting">System</string>
        <string name="app_setting">Applications</string>

    5. Open 'res/values/ids.xml' from the decompiled settings apk in your favorite text editor and add the following to the end of the list of ID's
    Code:
        <item type="id" name="linearLayout1">false</item>
        <item type="id" name="personalized_tab">false</item>
        <item type="id" name="device_tab">false</item>
        <item type="id" name="app_tab">false</item>
        <item type="id" name="cursor">false</item>
        <item type="id" name="vPager">false</item>

    6.Now you must recompile the settings.apk. This is because APKtool will give resource ID's to certain resources we added during this process, we need these generated ID's in the following steps because the code access's some resources directly by the ID's.

    7. Decompile the Newly recompiled APK again, from here on out I will assume your editing this newly recompiled/decompiled version.

    8. With this step it is very easy to make a typo, so please make sure you are paying Extra attention to details during this step.
    -Open up 'res/values/public.xml' and you will find lines similar to the following.
    Code:
    <public type="id" name="[COLOR="Red"]vPager[/COLOR]" id="[U]0x7f08022a[/U]" />
    -Below I will give you a list of .smali file names, each file is located in the 'smali/com/android/settings/' folder of your decompiled settings.apk
    - Each file name will be followed by a line similar to above, you need to search the smali files for the ID(underlined in the example above)
    - Then search the public.xml I told you to open above for the name for each line(red in example above)
    - Replace the ID in the smali file with the one you located in the public.xml
    Code:
    !--MainSettings.smali--!
        <public type="id" name="vPager" id="0x7f08022a" />
        <public type="id" name="cursor" id="0x7f080229" />
        <public type="id" name="app_tab" id="0x7f080168" />
        <public type="id" name="device_tab" id="0x7f080228" />
        <public type="id" name="personalized_tab" id="0x7f080227" />
        <public type="layout" name="mainsetting" id="0x7f040090" />
    	
    	
    !--DeviceSettings.smali--!
        <public type="xml" name="device_settings_headers" id="0x7f050051" />
    
    	
    !--AppSettings.smali--!
        <public type="xml" name="app_settings_headers" id="0x7f050052" />
    	
    !--PersonalSettings.smali--!
        <public type="xml" name="personal_settings_headers" id="0x7f050053" />

    9. Now open up the 'AndroidManifest.xml' of your decompiled settings.apk in a text editor.
    -Find a section similar to the below....
    Code:
    <activity android:label="@string/settings_label_launcher" android:name="Settings" android:taskAffinity="com.android.settings" android:clearTaskOnLaunch="true" android:launchMode="singleTop">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <action android:name="android.settings.SETTINGS" />
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
    The important parts you are looking for are 'name="Settings" and the 'android.intent.category.LAUNCHER' lines, there *should* only be a single section with these.
    Change this section to the below:
    Code:
            <activity android:label="@string/settings_label_launcher" android:name="Settings">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.DEFAULT" />
                </intent-filter>
            </activity>

    Directly above that section copy/paste the following code:
    Code:
    <activity android:name="MainSetting" android:theme="@android:style/Theme.NoTitleBar"  android:taskAffinity="com.android.settings" android:launchMode="singleTask">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <action android:name="android.settings.SETTINGS" />
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
            <activity android:label="@string/settings_label_launcher" android:name="PersonalSettings" android:taskAffinity="com.android.settings" android:launchMode="singleTask">
                <intent-filter>
                    <category android:name="android.intent.category.DEFAULT" />
                </intent-filter>
            </activity>
            <activity android:label="@string/settings_label_launcher" android:name="DeviceSettings" android:taskAffinity="com.android.settings" android:launchMode="singleTask">
                <intent-filter>
                    <category android:name="android.intent.category.DEFAULT" />
                </intent-filter>
            </activity>
            <activity android:label="@string/settings_label_launcher" android:name="AppSettings" android:taskAffinity="com.android.settings" android:launchMode="singleTask">
                <intent-filter>
                    <category android:name="android.intent.category.DEFAULT" />
                </intent-filter>
            </activity>

    10. You are now done with this round of modifications, its time to recompile the APK. Because this is a system app and we edited AndroidManifest.xml we must sign this recompiled Apk before pushing it to the system. You can try using any of the keys that come with whatever apk signing tool you use, but you will more then likely end up with a Settings.apk that wont show as being installed. To overcome this on ASOP roms I download and sign system apks with the platfrom keys from CyanogenMod's android_build github. If everything goes well and you push the new signed apk to the system, your settings app should now look similar to this when you open it.
    oZQ8h.png


    11. What you have is 3 tabs with no settings. I left this for you to do, as each rom has its own specific settings options. Most ASOP roms store the main page of settings options in the 'res/xml/settings_headers.xml'. Copy/paste/reorganize each of these options into the 'app_settings_headers.xml', 'device_settings_headers.xml' and 'personal_settings_headers.xml' files which are also located in 'res/xml/'.

    12. After all is said and done above, you *may* need to edit/theme the 'res/layout/mainsettings.xml' to suit your roms specific look.


    NOTE:
    If you are attempting this on a Non-ASOP Rom or are having trouble you may need to follow these additional instructions



    And to finally end this, here are some screenshots where I added this feature to the settings.apk of our twistedmodICS rom by pwn.
    2n5Il.png

    j5zRc.png

    jYp49.png
    18
    STEP 1. OK
    STEP 2 OK

    STEP 3 OK
    In Public.xml find this line
    Code:
     <public type="xml" name="settings_headers" id="[COLOR="Red"]0xXXXXXXXX[/COLOR]" />
    0xXXXXXXXX is your settings_header public ids

    STEP 4 I do not find the ID must change sorry You have a tip to easily find the id ?
    go to smali\com\android\settings\
    and open with your favorite text editor
    AppSettings.smali, DeviceSettings.smali, PersonalSettings.smali
    and find settings_header ids (0xXXXXXXXX) in all that 3 smali, so it's goona be like this
    Code:
    [COLOR="Red"]0xXXXXXXXX[/COLOR]   in   AppSettings.smali
    
    [COLOR="Red"]0xXXXXXXXX[/COLOR]  in  DeviceSettings.smali
    
    [COLOR="Red"]0xXXXXXXXX[/COLOR]  in  PersonalSettings.smali

    STEP 5 OK To approach the ID has changed search >
    Code:
    .local p1, headers:Ljava/util/List
    STEP 6. Wait last step 3 and 4 to finish with XML
    go to this page http://xdaforums.com/showpost.php?p=40919671&postcount=38

    and this page http://xdaforums.com/showpost.php?p=41082390&postcount=46

    STEP 7 OK
    STEP 8 OK

    Hope it will work :)

    __________________________________________________________

    I watched the work you've done
    Thank you for the superb editing that you have done I was not afar but luckily you came to help me
    I strongly believe that this tutorial have parameters suitable for cyanogen bases
    I hope my case can help other members
    I want to thank you for the time you have given to help me

    I'm still sorry but I do not understand step 4 I can not find a correct ID to be changed
    I do not know exactly what ID must be changed

    I'm definitely a ball

    Many many thank you !!!

    are you sure you didn't find it ? :confused:

    STEP 4

    picture.php
    15
    Additional Instructions

    The following is direction from BigSplit. Please be sure the thank him wherever possible for this work.
    This is an addendum to the instructions on the OP which you still need to follow. I have added additional notes here in Green.
    If something is not clear, please ask that I may update the notes.
    Cheers - TD

    Additional Porting Instructions

    1. I would make sure you just have blank XML's for the lists of settings to start with(this will make it easier to debug).

    2. AppSettings.smali, DeviceSettings.smali and PersonalSettings.smali files are all based off of Settings.smali. Settings.smali may be named differently in a non-asop based ROM or a custom ROM, but its the smali the displays the list of all settings.

    3. Knowing this, you would replace all AppSettings.smali & AppSettings$xxx.smali(the sub-classes) with copies of Settings.smali and Settings$xxx.smali files to make sure those files contain the exact functionality you need for your ROM.
    - This means making copies of the Settings smali files and renaming them. For me this was ONLY the files Settings.smali, Settings$1.smali, Settings$2.smali, Settings$HeaderAdapter.smali, Settings$HeaderAdapter$HeaderViewHolder.smali

    4. Within the AppSettings.smali and subclasses you would need to replace ALL occurrences of "com/android/settings/Settings"(or whatever its named) with "com/android/settings/AppSettings"(to ensure all calls are pointing to the correct paths).
    - Pay attention! Not ALL occurences. For instance see the following excerpt from new AppSettings.smali that references other subsets of settings that I do not want to rename (note #annotations section):
    .class public Lcom/android/settings/AppSettings;
    .super Landroid/preference/PreferenceActivity;
    .source "Settings.java"

    # interfaces
    .implements Landroid/accounts/OnAccountsUpdateListener;
    .implements Lcom/android/settings/ButtonBarHandler;


    # annotations
    .annotation system Ldalvik/annotation/MemberClasses;
    value = {
    Lcom/android/settings/Settings$CustomizableKeySettingsActivity;,
    Lcom/android/settings/Settings$HomeSettingsActivity;,
    Lcom/android/settings/Settings$WimaxSettingsActivity;,
    Lcom/android/settings/Settings$GlobalRoamingSettingsActivity;,
    Lcom/android/settings/Settings$NfcSettingsActivity;,
    Lcom/android/settings/Settings$PowerSettingsActivity;,
    Lcom/android/settings/Settings$DormantmodeSettingsActivity;,
    Lcom/android/settings/Settings$EasyModeSettingsActivity;,
    Lcom/android/settings/Settings$PenSettingsMenuActivity;,
    Lcom/android/settings/Settings$SoftwareUpdateSettingActivity;,
    Lcom/android/settings/Settings$AllShareCastSettingsActivity;,
    Lcom/android/settings/Settings$DualClockSettingActivity;,
    Lcom/android/settings/Settings$SBeamSettingsActivity;,
    Lcom/android/settings/Settings$NearbySettingsActivity;,
    Lcom/android/settings/Settings$AndroidBeamSettingsActivity;,
    Lcom/android/settings/Settings$TextToSpeechSettingsActivity;,
    Lcom/android/settings/Settings$AdvancedWifiSettingsActivity;,
    Lcom/android/settings/Settings$DataUsageSummaryActivity;,
    Lcom/android/settings/Settings$DeviceAdminSettingsActivity;,
    Lcom/android/settings/Settings$CryptSDCardSettingsActivity;,
    Lcom/android/settings/Settings$CryptKeeperSettingsActivity;,
    Lcom/android/settings/Settings$AccountSyncSettingsActivity;,
    Lcom/android/settings/Settings$PowerUsageSummaryActivity;,
    Lcom/android/settings/Settings$RunningServicesActivity;,
    Lcom/android/settings/Settings$DockSettingsActivity;,
    Lcom/android/settings/Settings$PrivacySettingsActivity;,
    Lcom/android/settings/Settings$LocationSettingsActivity;,
    Lcom/android/settings/Settings$SecuritySettingsActivity;,
    Lcom/android/settings/Settings$AccessibilitySettingsActivity;,
    Lcom/android/settings/Settings$DevelopmentSettingsActivity;,
    Lcom/android/settings/Settings$StorageUseActivity;,
    Lcom/android/settings/Settings$ManageApplicationsActivity;,
    Lcom/android/settings/Settings$DeviceInfoSettingsActivity;,
    Lcom/android/settings/Settings$PowerSavingModeSettingsActivity;,
    Lcom/android/settings/Settings$LockScreenSettingsActivity;,
    Lcom/android/settings/Settings$LockscreenMenuActivity;,
    Lcom/android/settings/Settings$DisplaySettingsActivity;,
    Lcom/android/settings/Settings$SoundSettingsActivity;,
    Lcom/android/settings/Settings$UserDictionarySettingsActivity;,
    Lcom/android/settings/Settings$LocalePickerActivity;,
    Lcom/android/settings/Settings$SpellCheckersSettingsActivity;,
    Lcom/android/settings/Settings$KeyboardLayoutPickerActivity;,
    Lcom/android/settings/Settings$InputMethodAndLanguageSettingsActivity;,
    Lcom/android/settings/Settings$WifiP2pSettingsActivity;,
    Lcom/android/settings/Settings$WifiApSettingsActivity;,
    Lcom/android/settings/Settings$WifiSettingsActivity;,
    Lcom/android/settings/Settings$StorageSettingsActivity;,
    Lcom/android/settings/Settings$DateTimeSettingsActivity;,
    Lcom/android/settings/Settings$VpnSettingsActivity;,
    Lcom/android/settings/Settings$TetherSettingsActivity;,
    Lcom/android/settings/Settings$WirelessSettingsActivity;,
    Lcom/android/settings/Settings$BluetoothSettingsActivity;,
    Lcom/android/settings/Settings$HeaderAdapter;
    }
    .end annotation

    Annotation section DOES need to be modified in the new sub files (with the $ in filename).
    See additional note here about this section in the other files:
    http://xdaforums.com/showpost.php?p=45845219&postcount=108

    5. Now open up your 'res/values/public.xml'(YOUR ORIGINAL ROMS) and find the resource ID for 'settings_headers' or the name of the xml where your settings are normally stored.

    6. THIS MUST BE DONE AFTER YOU COMPILE/DECOMPILE(read original tutorial). Find the resource ID for "app_settings_headers" in the public XML.

    7. Now that you have both ID's, search all AppSettings.smali and subclasses for the ORIGINAL(settings_headers) ID and replace all occurrences with the ID for "app_settings_headers".

    8. Repeat steps 4-7 with the DeviceSettings.smali and PersonalSettings.smali files and finish following the tutorial.

    9 I would not add any items to the XML files until you have it working with swiping between 3 blank tabs.

    Important Note about the settings.zip available on the OP:

    The only smali files I used from the zip you should need are smali/com/android/settings/mainsetting smali files.
    This only applies to the smali section, the files for the main apk are still fine to use.


    Addendum:
    - Also see these posts:
    http://xdaforums.com/showpost.php?p=40919671&postcount=38
    http://xdaforums.com/showpost.php?p=41075332&postcount=44
    - Added a set of completed secsettings/res/xml files for download. They are for example only. Yours will be different when it is completed.
    6
    6
    Wow thanks
    I finally understood
    has this place I put the id's device app and personalized :silly:

    HiHaaaa?§!

    thank you

    I wonder if you should not post this mod in my section to give you all the credit directly

    Members of my section requests other mod you posted lol


    thank you very much for your listening, your help and your patience

    Now XML part and I'll let you know so that you create the topic in my section if you wish !!!

    Great :D, now you undesrtand :D

    yahh Lols :p., sure you must post it by you your self :)

    and for lokscreen and brightness bar, I'll write porting guide soon on Android Theme section,. I'll let you know when the thread is ready :)