[DEV][GUIDE][MODDING][SETTINGS] Collection of mods and features [TOUCHWIZ] - Android

Hello buddies..
From the concept SHARING IS CARING, I am going to share some mods specifically on SecSettings.apk that I stumbled across and share it with you in one thread
Keep in mind that most of them are not mine but from the community so actual credits are to be given to the owners. So please let me know if you have any modding that I didn't mention
So let's start!!
Needed tools:
1) Apktool or others that do the job
2) Notepad++ program from here
3) The patience and a willing partner! sorry no link for that
I am not going to teach you how to use these programs because I am assuming that you already know how to use them if not then check their respective documentations!
You must deodex SecSettings.apk before proceeding.
A lot of works are done by various xda members, some are from other sites, some are mine. If you found the guide of your mod here and you haven't been credited, please PM.
Click to expand...
Click to collapse
Adding Custom image + Onclick Functionality
Credits to @iamareebjamal
Decomplie SecSettings.apk using Apktool
Download the SettingsSource.zip
Extract contents of SettingsSource.zip to respective folders in SecSettings.apk
Open res/xml/device_info_settings.xml
Add this just a line above the first Preference tag
Code:
<PreferenceCategory android:layout="@layout/areebisawesome" android:key="blah" android:title="" />
Now go to res/drawable
There, you'll see cosmic.png Change it to any png of size 320x200 You can change this size description in res/layout/areebisawesome.xml
N.B: Also we can use android:layout_width="fill_parent"so that if we add small resolution picture then it will automatically fill whole width
Click to expand...
Click to collapse
Recompile
Onclick Functionality
Credits to @abhi922
Open res/layout/areebisawesome.xml
Add the blue code to the XML
Code:
<?xml version="1.0" encoding="utf-8"?>
<ImageView android:layout_gravity="center" android:paddingBottom="6.0dip" [COLOR="Blue"]android:clickable="true"[/COLOR] android:layout_width="fill_parent" android:layout_height="400.0px" [COLOR="blue"]android:src="@drawable/about"[/COLOR] android:scaleType="fitXY"
xmlns:android="http://schemas.android.com/apk/res/android" />
What I've Done ????
Added android:clickable="true" ------> to make our layout clickable
Added android:src="@drawable/about" ------> it is a xml not a picture/png...[it will replace our images on click ]
Create new file about.xml at drawable folder
Add this code to it
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/about2" />
<item android:state_selected="true" android:drawable="@drawable/about2" />
<item android:drawable="@drawable/about1" />
</selector>
Now add about1.png as first unpressed picture
And about2.png as pressed picture...
Recomplie
Adding About ROM new information
Decompile SecSettings.apk
Open /res/xml/device_info_settings.xml
In device_info_settings.xml, go to the end and add these lines before </PreferenceScreen> line
Code:
<PreferenceCategory android:title="@string/rom_info" android:key="dummy_key">
<Preference android:title="@string/rom_name" android:key="rom_name" android:summary="@string/rom_name_details" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/rom_ver" android:key="rom_ver" android:summary="@string/rom_ver_details" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/rom_date" android:key="rom_date" android:summary="@string/rom_date_details" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/rom_developer" android:key="rom_developer" android:summary="@string/rom_developer_name" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/dev_thanks" android:key="dev_thanks" android:summary="@string/dev_thanks_name" style="?android:preferenceInformationStyle" />
</PreferenceCategory>
N.B: all referred android:key here are dummy ones they are only there just to prevent code fragmentation
Click to expand...
Click to collapse
Then open res/values/strings.xml & add the following lines
Code:
<string name="rom_info">[COLOR="Sienna"]About Rom[/COLOR]</string>
<string name="rom_name">[COLOR="Sienna"]Rom name[/COLOR]</string>
<string name="rom_name_details">[COLOR="Sienna"][ROM Name][/COLOR]</string>
<string name="rom_ver">[COLOR="Sienna"]Rom version[/COLOR]</string>
<string name="rom_ver_details">[COLOR="Sienna"]vx.x[/COLOR]</string>
<string name="rom_date">[COLOR="Sienna"]Release date[/COLOR]</string>
<string name="rom_date_details">[COLOR="Sienna"]month-year[/COLOR]</string>
<string name="rom_developer">[COLOR="Sienna"]Rom developer[/COLOR]</string>
<string name="rom_developer_name">[COLOR="Sienna"][your name] - xda.developers.com[/COLOR]</string>
<string name="dev_thanks">[COLOR="Sienna"]Thanks to[/COLOR]</string>
<string name="dev_thanks_name">[COLOR="Sienna"]Everyone for the support[/COLOR]</string>
You can change the green color text to whatever you want to display
Click to expand...
Click to collapse
You can add or remove fields in device_info_settings.xml and strings.xml as you like
Recompile
Integrating application
Decompile SecSettings.apk.
Decompile the program that you want to add to settings menu (in this example will take chainfire's SuperSU app)
Go to res\drawable-xhdpi folder and add icon for your program that you want to add (you can take it from decompiled program in res/mipmap-xhdpi.
Go to res\values folder and open strings.xml by NotePad++ and add these lines just before </resources> for your program
Code:
<string name="romaddons">ROM Addons</string>
<string name="superuser_text">Superuser</string>
Go to \res\xml folder and open settings_headers.xml by NotePad++ and add the blue lines
Code:
<header android:icon="@drawable/ic_settings_accessibility" android:id="@id/accessibility_settings" android:title="@string/accessibility_settings" android:fragment="com.android.settings.AccessibilitySettings" />
[COLOR="Blue"] <string name="romaddons">ROM Addons</string>
<header android:icon="@drawable/ic_settings_superuser" android:title="@string/superuser_text">
<intent android:targetPackage="eu.chainfire.supersu" android:action="android.intent.action.MAIN" android:targetClass="eu.chainfire.supersu.MainActivity" />
</header>[/COLOR]
<header android:icon="@drawable/ic_settings_development" android:id="@id/development_settings" android:title="@string/development_settings_title" android:fragment="com.android.settings.DevelopmentSettings" />
Then install the program you want to add on your phone
Extra step is to remove this line in AndroidManifest.xml in your decompiled SuperSU app so to disappear from the launcher
Code:
<category android:name="android.intent.category.LAUNCHER" />
Adding other apps
Sample down here for learning
Code:
<header android:icon="@drawable/ic_settings_xxxx" android:title="@string/xxxx_text">
<intent android:targetPackage="" android:action="" android:targetClass="" />
</header>
"android:icon="@drawable/ic_settings_xxxx"" : name of icon you put in drawable-xhdpi folder if you want it to be empty the add this to drawable and empty_icon as the name of the icon
"android:title="@string/xxxx_text"" : name of string put for added program in strings.xml
"android:targetPackage=""" : package of wanted program inside its own AndroidManifest.xml
"android:action=""" : first action of wanted program inside its own AndroidManifest.xml
"android:targetClass=""" : class of the wanted package inside its own AndroidManifest.xml to start with in this case its .MainActivity
Settings menu extra hidden options
Credits to @tkari4
Baksmali SecSettings.apk
Open com\android\settings\Settings.smali
Look for these lines and delete them:
Code:
invoke-interface {p1, v0}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
goto/16 :goto_23
Note that some FC so head to the forum or download SettingsSmali.rar to see what works or not
Adding TorchLight Option
Credits to @Stavr0s91i
Decompile SecSettings.apk
Goto res/xml/display_settings.xml
Apply Changes Below (Blue)
Code:
<PreferenceCategory android:title="@string/tts_general_section_title" android:key="general" />
<PreferenceScreen android:title="@string/wallpaper" android:key="wallpaper" android:fragment="com.android.settings.WallpaperSettings" />
<PreferenceScreen android:title="@string/led_indicator_settings" android:key="led_indicator_settings" android:fragment="com.android.settings.LedIndicatorSettings" />
[COLOR="Blue"]<PreferenceScreen android:title="Torchlight" android:key="torchlight" android:fragment="com.android.settings.torchlight.TorchlightSettings" />[/COLOR]
<PreferenceScreen android:title="@string/notification_panel_title" android:key="notification_panel_edit" android:fragment="com.android.settings.NotificationPanelMenu" />
<CheckBoxPreference android:title="@string/multi_window_title" android:key="key_multi_window" android:summary="@string/multi_window_summary" android:widgetLayout="@touchwiz:layout/preference_widget_twcheckbox" />
<SwitchPreferenceScreen android:title="@string/page_buddy" android:key="contextualpage_settings" android:summary="@string/page_buddy_summary" android:fragment="com.android.settings.ContextualPageSettings" />
Compile SecSettings.apk!
Setting up a custom settings tab
Credits to @Didact74
Download Smali.zip
Place it in smali/com/android/settings
Navigate to res/xml/settings_headers.xml
Add this line of code anywhere you want it
Code:
<header android:icon="@drawable/ic_settings_romcontrol" android:id="@id/new_tab" android:title="@string/rom_control" android:fragment="com.android.settings.NewTab" />
android:icon="@drawable/ic_settings_romcontrol = The icon you see in the tab and the location that icon is stored
android:id="@id/new_tab" = Android ID thats stored in res/values/ids
android:title="@string/rom_control" = The title the new tab is given located in res/values/strings
android:fragment="com.android.settings.NewTab" = points to the smali that controls this tab
Create your own icon.png (size 50 x 50) and drop it in res/drawable-xhdpi
Navigate to res/values/strings.xml & add this line of code before </resources>
Code:
<string name="rom_control">Rom Control</string>
<string name="rom_addons">Rom Addons</string>
Create an XML file with the name "new_tab.xml"
Navigate to res/values/ids.xml & add this line of code before </resources>
Code:
<item type="id" name="new_tab">false</item>
Example:
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/rom_addons"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<!-- Place your settings here -->
</PreferenceScreen>
You will need to add the necessary lines to res/strings found in the XML if would add any others
Do not worry about finding a unique ID for res/public just let the system generate one for you
Click to expand...
Click to collapse
Recompile the decompile to generate ids in public.xml
Find this line in res/values/public.xml
Code:
<public type="xml" name="new_tab" id="0x7fxxxxxx" />
Take your unique id and change it in NewTab.smali from
Code:
const v1, [COLOR="Red"]0x7f070082[/COLOR]
To
Code:
const v1, [COLOR="Blue"]0x7fxxxxxx[/COLOR]
Then change
Code:
invoke-virtual {p0, v1}, Lcom/android/settings/[COLOR="Red"]didact/RomSettings[/COLOR];->addPreferencesFromResource(I)V
To
Code:
invoke-virtual {p0, v1}, Lcom/android/settings/[COLOR="Blue"]NewTab[/COLOR];->addPreferencesFromResource(I)V
Done :good:
Switch to Light theme
Decompile the SecSettings.apk
Go to "res/values/" folder and open the file "styles.xml" with Notepad++
Click "Replace" or press "Ctrl+H"
In the "Find What :" box enter "DeviceDefault" and hit next
In the "Replace with: " box enter "DeviceDefault.Light"
Make sure only "wrap around" box is checked
Then press replace all
Compile SecSettings.apk
Permanent "Official" Device Status
This one is explained very well by @[email protected] in this post. Make sure to hit Thanks button for him
Owner Profile in About Device
Credits to @Deckoz2302, @b16h22 and @nightwalker
Download the zip and extract it Owner_Profile_Mod.zip
Decompile SecSettings.apk
Go to res/values/ids.xml... add these:
Code:
<item type="id" name="image">false</item>
<item type="id" name="owner">false</item>
<item type="id" name="linear_layout">false</item>
<item type="id" name="profile_pic">false</item>
<item type="id" name="layout1">false</item>
<item type="id" name="change_picture_text">false</item>
<item type="id" name="photo_picker">false</item>
<item type="id" name="linear_layout1">false</item>
<item type="id" name="layout2">false</item>
<item type="id" name="name_field">false</item>
<item type="id" name="name_edit">false</item>
<item type="id" name="profile">false</item>
<item type="id" name="profile_name">false</item>
<item type="id" name="ic_qs_default_user">false</item>
Next go to res/values/strings.xml.. add these:
Code:
<string name="change_pic">Change profile picture</string>
<string name="profile_pic">SET PROFILE PICTURE</string>
<string name="profile_name">CHANGE PROFILE NAME</string>
Now find the files you extracted and put the com folder in correct directory..
Code:
SecSetting/smali/com/blac
Now put the files from the res folder in correct directories..
Code:
res/layout/lacourb.xml
res/layout/profile_info.xml
res/drawable-hdpi/ (is where the png files go)
res/drawables/done.xml
res/drawable/pick_profile_picture.xml
Forgot to include it so add ic_qs_default_user to res/drawable/xhdpi
Now go to where you want to have the option of changing the Profile Picture and Name. Maybe display_settings.xml it doesn't matter so put it where you want it.
Code:
<PreferenceScreen android:title="Owner Profile Picture">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.blac.Profile" />
</PreferenceScreen>
XML's will vary too depending on which one you pick so you need adjust the tag in the beginning of the line and the end of line depending on what it is calling. Example: <PreferenceScreen></PreferenceScreen> OR <headers></headers> so visualize the layout of the xml
Now go to res/xml/device_info_settings.xml and add:
Code:
<PreferenceCategory android:title="Device Info" />
<PreferenceScreen android:fragment="[COLOR="Orange"]com.android.settings.deckoz.RomControl.General[/COLOR]" android:focusable="false" android:layout="@layout/lacourb" android:key="profile_pic" />
Pay special attention to the line in ORANGE. This line defines where it takes you when the image is clicked when in About Device. So you would NOT add the same directory as mine because you won't have it. But you DO need to define this because if DO NOT it will FC
So say you want it to be under Users in SecSettings/General/Users.. you would add it like this:
Code:
<PreferenceCategory android:title="Device Info" />
<PreferenceScreen android:fragment="[COLOR="Orange"]com.android.settings.UserSettings[/COLOR]" android:focusable="false" android:layout="@layout/lacourb" android:key="profile_pic" />
So now when you click the picture in About Device it will bring you to this directory in SecSettings. So you'll end up in SecSettings/General/Users
Now open your AndroidManifest.xml. At the bottom add these lines:
Code:
<activity android:label="@string/change_pic" android:name="com.blac.Profile">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
Okay now compile your SecSettings..Then grab the newly compiled one and decompile it.. Make sure you keep the AndroidManifest.xml because you changed it..
Now go to the MY public.xml you downloaded and extracted and then open YOUR res/values/public.xml open it and keep it open..You need to have these open to compare ids..
Open your smali folder you added: com/blac/
You need to find all the ids in the smali and change them to match yours.. for example open com/blac/Profile.smali.. Search 0x7f0401ee
Under my public.xml this id: 0x7f0401ee is for "profile_info".. Yours will NOT be the same.. SO you need to search each id in the smali and then in MY public.xml, you downloaded, then search yours and changed the id's...
NOTE: Be free to changed whatever you want..directories, names of xml etc...
Adding 5 icons shortcut on lockscreen
Credits to @Mirko ddd
Decompile SecSettings.apk and navigate to:
smali\com\android\settings\lockscreenshortcut\LockScreenShortcutSettings.smali
Search for the method ".method static constructor <clinit>()V"
Add the blue code in change of the red code
Code:
.method static constructor <clinit>()V
.registers 2
.prologue
const/4 v1, 0x0
.line 79
[COLOR="Blue"] const/4 v0, 0x5[/COLOR]
[COLOR="Red"] const/4 v0, 0x3[/COLOR]
sput v0, Lcom/android/settings/lockscreenshortcut/LockScreenShortcutSettings;->MAX_SHORTCUT_ICON:I
.line 80
sput v1, Lcom/android/settings/lockscreenshortcut/LockScreenShortcutSettings;->DEFAULT_CURSOR_WIDTH:I
.line 81
sput v1, Lcom/android/settings/lockscreenshortcut/LockScreenShortcutSettings;->ICON_5_CURSOR_WIDTH:I
return-void
.end method
Now we need to set the right icon width for the icons, if not the fifth icon won t be showed
Decompile framework-res.apk
Navigate to res\values-hdpi\dimens.xml
Edit these 2 strings with following values
Code:
<dimen name="keyguard_lockscreen_application_shortcut_icon_width">52.0dip</dimen>
<dimen name="keyguard_lockscreen_application_shortcut_icon_height">50.0dip</dimen>
Recompile and push both apks with 0644 permissions

Theming
1. Go to res/drawable-[your device dpi]
2. In here you'll find all kind of images but I'm gonna give you about some of the main images and you figure out the others
ic_settings_* : These where you find all the icons on the settings menu, some of these are unused which are hidden
ic_sync_*_holo : These are sync animations that appear in the "Accounts and sync" menu
ic_wifi_lock_signal_* & ic_wifi_signal_ *: These are wifi signals that appear in the "Wi-Fi" menu
shortcut_ *: These icons in which we make shortcuts from the settings widget
lock_anim_* : These are the tutorial images to teach you how to use pattern (don't bother if its hidden)
motion_ *: Motion tutorial (don't bother if its hidden)
3. Navigate to res/mipmap-[your device dpi]
ic_launcher_settings : Launcher icon
Now im gonna share with you S6 SecSettings resource files mainly png files. Link
CSC Features
Navigate to system/csc/feature.xml or others.xml..
These are some of the features you can add so read the description and choose your preference
Code:
[COLOR="Green"]<!-- Most of them are universal but no guarantees given -->[/COLOR]
[COLOR="green"] <!-- Start Features -->[/COLOR]
[COLOR="green"] <!-- Hide Software Update from Settings -->[/COLOR]
[COLOR="blue"]<CscFeature_Setting_DisableMenuSoftwareUpdate>true</CscFeature_Setting_DisableMenuSoftwareUpdate>[/COLOR]
[COLOR="green"] <!-- Show your hardware revision in Settings->About (same as dialing *#12580*369#) -->[/COLOR]
[COLOR="blue"]<CscFeature_Setting_EnableHwVersionDisplay>true</CscFeature_Setting_EnableHwVersionDisplay>[/COLOR]
[COLOR="green"]<!-- Restore the hidden APN -->[/COLOR]
[COLOR="blue"] <CscFeature_Setting_HideApnList>pcweb.tmobile.com</CscFeature_Setting_HideApnList>[/COLOR]
[COLOR="green"]<!-- Find my mobile/Sim replacement alert -->[/COLOR]
[COLOR="blue"] <CscFeature_Setting_DisableMenuFindMyMobile>false</CscFeature_Setting_DisableMenuFindMyMobile>
<CscFeature_Settings_FindMyMobile>true</CscFeature_Settings_FindMyMobile>[/COLOR]
[COLOR="green"]<!-- Call and message block -->[/COLOR]
[COLOR="blue"]<CscFeature_Setting_EnableMenuBlockCallMsg>true</CscFeature_Setting_EnableMenuBlockCallMsg>[/COLOR]
[COLOR="green"]<!-- Factory data reset password -->[/COLOR]
[COLOR="blue"] <CscFeature_Setting_EnableFactoryResetPasswordWhenNoSIM>true</CscFeature_Setting_EnableFactoryResetPasswordWhenNoSIM>[/COLOR]
[COLOR="green"]<!-- Display installed variant -->[/COLOR]
[COLOR="blue"]<CscFeature_Common_EnableRegionalDevice>true</CscFeature_Common_EnableRegionalDevice>[/COLOR]
[COLOR="green"] <!-- End Features -->[/COLOR]
Push the xml & set permissions to 0644

Reserved
Additions:
- Added CSC Features

Awesome guide mate
Straight Outta Wcoast

wcoast said:
Awesome guide mate
Straight Outta Wcoast
Click to expand...
Click to collapse
Thanks its only the beginning

RainbowLaw said:
Thanks its only the beginning[emoji14]
Click to expand...
Click to collapse
Keep up the good work...
Straight Outta Wcoast

Wohoo thanks a lot mate, i am new learner will test your guides on my galaxy note 5 rom. Keep up the good work mate

nice mate
since i never want to search about sec bla bla bla .apk mod tutorial
thx for ur guide
keep it up

Really good guide, hope you continue to add to it. Should be on xda portal
Sent from my SM-N920C using Tapatalk

RainbowLaw said:
Theming
1. Go to res/drawable-[your device dpi]
2. In here you'll find all kind of images but I'm gonna give you about some of the main images and you figure out the others
ic_settings_* : These where you find all the icons on the settings menu, some of these are unused which are hidden
ic_sync_*_holo : These are sync animations that appear in the "Accounts and sync" menu
ic_wifi_lock_signal_* & ic_wifi_signal_ *: These are wifi signals that appear in the "Wi-Fi" menu
shortcut_ *: These icons in which we make shortcuts from the settings widget
lock_anim_* : These are the tutorial images to teach you how to use pattern (don't bother if its hidden)
motion_ *: Motion tutorial (don't bother if its hidden)
3. Navigate to res/mipmap-[your device dpi]
ic_launcher_settings : Launcher icon
Now im gonna share with you S6 SecSettings resource files mainly png files. Link
CSC Features
Navigate to system/csc/feature.xml or others.xml..
These are some of the features you can add so read the description and choose your preference
Code:
[COLOR="Green"]<!-- Most of them are universal but no guarantees given -->[/COLOR]
[COLOR="green"] <!-- Start Features -->[/COLOR]
[COLOR="green"] <!-- Hide Software Update from Settings -->[/COLOR]
[COLOR="blue"]<CscFeature_Setting_DisableMenuSoftwareUpdate>true</CscFeature_Setting_DisableMenuSoftwareUpdate>[/COLOR]
[COLOR="green"] <!-- Show your hardware revision in Settings->About (same as dialing *#12580*369#) -->[/COLOR]
[COLOR="blue"]<CscFeature_Setting_EnableHwVersionDisplay>true</CscFeature_Setting_EnableHwVersionDisplay>[/COLOR]
[COLOR="green"]<!-- Restore the hidden APN -->[/COLOR]
[COLOR="blue"] <CscFeature_Setting_HideApnList>pcweb.tmobile.com</CscFeature_Setting_HideApnList>[/COLOR]
[COLOR="green"]<!-- Find my mobile/Sim replacement alert -->[/COLOR]
[COLOR="blue"] <CscFeature_Setting_DisableMenuFindMyMobile>false</CscFeature_Setting_DisableMenuFindMyMobile>
<CscFeature_Settings_FindMyMobile>true</CscFeature_Settings_FindMyMobile>[/COLOR]
[COLOR="green"]<!-- Call and message block -->[/COLOR]
[COLOR="blue"]<CscFeature_Setting_EnableMenuBlockCallMsg>true</CscFeature_Setting_EnableMenuBlockCallMsg>[/COLOR]
[COLOR="green"]<!-- Factory data reset password -->[/COLOR]
[COLOR="blue"] <CscFeature_Setting_EnableFactoryResetPasswordWhenNoSIM>true</CscFeature_Setting_EnableFactoryResetPasswordWhenNoSIM>[/COLOR]
[COLOR="green"]<!-- Display installed variant -->[/COLOR]
[COLOR="blue"]<CscFeature_Common_EnableRegionalDevice>true</CscFeature_Common_EnableRegionalDevice>[/COLOR]
[COLOR="green"] <!-- End Features -->[/COLOR]
Push the xml & set permissions to 0644
Click to expand...
Click to collapse
Nice

Super helpful thread

Does anyone want to know how to change the default app on the home screen? I want to basically be able to change it where my app shows default on the home. So even if I factory reset it will still show on the homescreen.

asapmoola310 said:
Does anyone want to know how to change the default app on the home screen? I want to basically be able to change it where my app shows default on the home. So even if I factory reset it will still show on the homescreen.
Click to expand...
Click to collapse
Well its off-topic but you need to decompile your launcher if its samsung launcher then its SecLauncher2.apk or touchwiz30launcher.apk then go to res/xml here you will find the arrangements modify it then compile push it to your device and then clear data for the launcher

@RainbowLaw thanks for mentioning one of my tricks. Great thread, welldone.

Thanks for the guide really helpful
I was wondering if you can help me theming
How to change actionbar blue color ?
And settings text color ?
image hosting free no registration
I couldnt find those colors in color.xml !!!!
Thanks in advance

Related

[HOW TO] Port a Theme: By Nottach

How To Port a Theme: The Nottach Way
This first draft will probably have confusing parts so if you get stuck let me know and I'll make it clearer.
Backing Up:
The first thing you're going to want to do is backup the files you will be editing. I recommend making a CWM zip of the backed up files. That way if you bootloop you can easily flash back.
Steps To Backup:
You will most likely be theming framework-res.apk and systemui.apk at first. I will show you how to back them up. If you theme other files in the future be sure to add the original to your backup CWM update by repeating these steps. *note* this installer will only install files to the /system directory.
Pull /system/framework/framework-res.apk and /system/app/SystemUI.apk from your device using either adb or root explorer.
Download this pre-scripted zip and extract it to a folder of your choosing.
Place your original framework-res and systemui in their repective folders (framework;app).
Next zip the system and META-INF folders at the root of the extracted folder and be sure to choose a compression of "store" or "none".
Copy the new zip to your SD and try to flash it. Just to make sure it works.
File Structure of the New Zip should be:
Code:
META-INF
-(unchanged contents)
system
-app
--systemui.apk
-framework
--framework-res.apk
If it doesn't flash the most common mistake would be not choosing "store" or "none" for compression.
Once you've got your back-up working you can begin theming.
Basic Theming:
These are my steps. They may seem backwards to some but I can get a quality port out in under an hour this way.
Getting the needed files.
Find a hdpi theme of your choosing.
Using winRAR extract the themes framework-res.apk and systemui.apk (if present).
Extract each apk to its own folder.
You should now have all the icons you should need inside each drawable-hdpi folder you just extracted, one for framework-res and one for systemui.
Have a look through the drawable-hdpi folders. These are the only two folders you'll need so you can delete the others if you wish.
Prepping.
Extract your back-up Zip to a new folder and name that folder after the theme you are working on.
First open framwork-res.apk with winrar.
Navigate to /res/drawable-hdpi
Copying Images.
You'll want to set both your winRAR window and the themes drawable folder side by side.
Next overwrite the icons/images in winRAR with the icons/images in the themes folder. Make sure to only choose the icons/images that are in the /res/drawable-hdpi winRAR. Dont just drag them all in, this will undoubtly leave you with unused icons that will bloat your framework.
Once youve copied over all the images you need, overwriting the originals.
Close the archive (winRAR).
Do the same for systemui.apk, only choosing the needed files.
Tips: If porting a CM7 theme a lot of file renaming will be required. First, sort all the files based on their prefixes (eg. framework-res_; com_android_systemui_; etc). Then, use all file renamer to easily delete XX characters from the left side. You'll need to have a look at what I mean to really get it.
Tips: Some themes lack a systemui.apk but will instead have the images needed for systemui.apk inside their framework-res.apk.
Tips: If a theme doesnt have enough battery icons you will have to make more to suit your framework-res. Do this by spanning the gaps with copies. For instance, if there are only 20 icons and you need 100, make 5 copies of each and name appropriately. This is the biggest pain about a 1% battery.
Once you've overwriten all the images in framework-res and sytemui go ahead and zip up your package following the same steps as the backup, naming the zip appropriately. Don't forget the "store" or "none" compression.
Now try to flash it. If it works it most likely won't be perfect, this is a first draft.
If it doesn't work, again check your compression and zip file structure.
Now take notes of things that are wrong or need fixing, text colors particularly. We will fix them in the next steps.
Editing the status bar.
Now that you can see what needs fixing in the status bar we will decompile your original (backup) systemui.apk and edit the xmls. I will assume you have apkmanager and know how to use it. There are other guides for that so I won't go to deep into it. Look here for a video tutorial on apkmanager.
Decompile systemui.apk
Make edits to XMLs.
These are the edits I make most often.
/res/layout/status_bar.xml -
Code:
<TextView android:textSize="16.0sp" android:textStyle="bold" android:gravity="left|center" android:id="@id/onsText" android:paddingLeft="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:maxLength="[COLOR="Red"]0[/COLOR]" /> [COLOR="red"]///HIDES CARRIER TEXT[/COLOR]
Click to expand...
Click to collapse
/res/layout/status_bar_expanded.xml -
Code:
<com.android.systemui.statusbar.DateView android:textAppearance="?android:textAppearanceLarge" android:textColor="[COLOR="Red"]#ffffffff[/COLOR]" android:layout_gravity="center_vertical" android:id="@id/dateLabel" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" /> [COLOR="red"]///DATE TEXT COLOR[/COLOR]
Click to expand...
Click to collapse
/res/values/drawable.xml -
Code:
<item type="drawable" name="shade_bgcolor">[COLOR="Red"]#ff162939[/COLOR]</item> [COLOR="red"]///NOTIFICATION TITLE BACKGROUND (eg. Ongoing)[/COLOR]
Click to expand...
Click to collapse
/res/values/style.xml -
Code:
<style name="TextAppearance.StatusBar.Title" parent="@android:style/TextAppearance.StatusBar">
<item name="android:textAppearance">?android:textAppearanceSmall</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///NOTIFICATION TITLE TEXT (eg. No Notifications)[/COLOR]
</style>
Click to expand...
Click to collapse
After making your xml edits recompile, be sure to delete the edited files and resources.arsc from the keep folder during recompiling. If you don't you won't see any changes.
If you compiled with no errors you're good to go. If you have errors then you have a mistake in your code. You can check the apkmanager log for line number errors.
Once recompiled you will have unsignedSystemUI.apk in your place_here_for_modding folder. Open it in winRAR along with your previous version of SystemUI.apk from the first draft and drag the images from the first draft drawable-hdpi folder into the new unsignedSysemUI.apk's corresponding folder, overwriting the images there. Now rename unsignedSystemUI.apk to SystemUI.apk and overwrite your first draft version. This is your second draft SystemUI.apk and we will create a second draft framework-res.apk in the next step using these same steps.
Editing the framework.
We will now decompile your original (backup) framework-res.apk and edit the xmls. Again using apkmanager.
Decompile systemui.apk
Make edits to XMLs.
These are the edits I make most often.
/res/drawable/progress_horizontal.xml - sliders & volume bars
Code:
<?xml version="1.0" encoding="UTF-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@id/background">
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#ff262223" android:endColor="#ff414042" android:angle="270.0" android:centerY="0.13" android:centerColor="#ff262223" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</item>
<item android:id="@id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#80[COLOR="red"]547f8c[/COLOR]" android:endColor="#a0[COLOR="red"]87cce2[/COLOR]" android:angle="-90.0" android:centerY="0.13" android:centerColor="#80[COLOR="red"]547f8c[/COLOR]" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</clip>
</item>
<item android:id="@id/progress">
<clip>
<shape>
<corners android:radius="5.0dip" />
<gradient android:startColor="#ff[COLOR="red"]547f8c[/COLOR]" android:endColor="#ff[COLOR="red"]87cce2[/COLOR]" android:angle="-90.0" android:centerY="0.13" android:centerColor="#ff[COLOR="Red"]547f8c[/COLOR]" />
<stroke android:width="2.0px" android:color="#ff999999" />
</shape>
</clip>
</item>
</layer-list>
Click to expand...
Click to collapse
/res/values/styles.xml - text colors
Code:
<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">[COLOR="red"]#ff555555[/COLOR]</item> [COLOR="red"]///POP UP MENU TEXT COLOR[/COLOR]
</style>
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
<item name="listViewStyle">@style/Widget.ListView.Menu</item>
<item name="textColor">[COLOR="red"]#ff555555[/COLOR]</item> [COLOR="red"]///SECONDARY MENU TEXT COLOR[/COLOR]
<item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
<item name="background">@null</item>
[COLOR="red"]///DELETED LINE[/COLOR]
</style>
Code:
<style name="TextAppearance.WindowTitle" parent="@style/TextAppearance">
<item name="textSize">14.0sp</item>
<item name="textStyle">bold</item>
<item name="textColor">[COLOR="Red"]#ffffffff[/COLOR]</item> [COLOR="red"]///WINDOW TITLE TEXT (App Title Bar)[/COLOR]
</style>
Code:
<style name="TextAppearance.StatusBar.Title" parent="@style/TextAppearance.StatusBar">
<item name="textStyle">bold</item>
<item name="textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///STATUS BAR TITLE (May be same as SystemUI?)[/COLOR]
</style>
Code:
<style name="TextAppearance.StatusBar.EventContent.Title" parent="@style/TextAppearance.StatusBar.EventContent">
<item name="textSize">16.0sp</item>
<item name="textStyle">bold</item>
<item name="textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///FIRST LINE OF NOTIFICATION[/COLOR]
</style>
Code:
<style name="TextAppearance.StatusBar.EventContent" parent="@style/TextAppearance.StatusBar">
<item name="textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///2ND LINE OF NOTIFICATION[/COLOR]
</style>
Code:
<style name="Widget.Button" parent="@style/Widget">
<item name="textAppearance">?textAppearanceSmallInverse</item>
<item name="textColor">[COLOR="red"]#ffffffff[/COLOR]</item> [COLOR="red"]///BUTTON TEXT COLOR[/COLOR]
<item name="gravity">center</item>
<item name="background">@drawable/btn_default</item>
<item name="focusable">true</item>
<item name="clickable">true</item>
</style>
Click to expand...
Click to collapse
After making your xml edits recompile, be sure to delete the edited files and resources.arsc from the keep folder during recompiling. If you don't you won't see any changes.
If you compiled with no errors you're good to go. If you have errors then you have a mistake in your code. You can check the apkmanager log for line number errors.
Now following the same steps as we did for SystemUI we will overwrite the images in the new unsignedframework-res.apk with those from the first draft framework-res.apk. By dragging from one winRAR window to the other. Once you've done that rename the new apk and overwrite the first draft version. Create a new update zip, using "store" or "none", and flash it. You should now see the text edits you just made.
Advanced Tips
.9 Images.
--If a .9.png is all (every pixel) one color then the .9 patch does not matter.
Hex editing.
--It is not always necessary to decompile to make text color or slider edits. Instead if know what color you're looking for you can use a hex editor to make the edits.
--For instance, to change text colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract resources.arsc
Open resources.arsc in a hex editor.
Search for the color in this format BB GG RR AA, as opposed to usual aarrggbb. (Red = ffff0000 = 00 00 FF FF)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
--To change slider colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract /res/drawable/progress_horizontal.xml
Open progress_horizontal.xml in a hex editor.
Search for 08 00 00 1C.
After each instance examine the next four pairs.
The first few will be grey but eventually youll come to a color.
That's where you start editing. (6 total)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
Undoing Moto's Status Bar Edits.
Post #15
Adding an Animated PullDown Shade.
[RESOURCES] - Theming the Atrix 4G: tools, processes, locations, etc.
Spot on work! Thanks a lot! I am planning to see if I can make a clean minimalistic theme once I can figure out how to do theming correctly
Motorola Atrix 2.3.4 bl unlocked full debian weptop and themed
Small donation on it's way to you for all your hard work!
Confirmation number: 3W612387P3801853H.
Awesome work! Hopefully I will get some time to understand this and port a theme or two
Nottach said:
Advanced Tips
.9 Images.
--If a .9.png is all (every pixel) one color then the .9 patch does not matter.
Hex editing.
--It is not always necessary to decompile to make text color or slider edits. Instead if know what color you're looking for you can use a hex editor to make the edits.
--For instance, to change text colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract resources.arsc
Open resources.arsc in a hex editor.
Search for the color in this format BB GG RR AA, as opposed to usual aarrggbb. (Red = ffff0000 = 00 00 FF FF)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
--To change slider colors without decompiling you would.
Open framework-res.apk in winRAR.
Extract /res/drawable/progress_horizontal.xml
Open progress_horizontal.xml in a hex editor.
Search for 08 00 00 1C.
After each instance examine the next four pairs.
The first few will be grey but eventually youll come to a color.
That's where you start editing. (6 total)
Replace with desired color following same format.
Save and overwrite original by dragging new version into winRAR.
Click to expand...
Click to collapse
Can i ask you a question seeing though you know abit about framework modding can you see were i have gone wrong here - http://forum.xda-developers.com/showthread.php?t=1195549
I can live with it but i would rather change it to a light gray or a different color? Or if not how would i be able to change the text in these pop up windows so i can see them properly? Any help would be very nice & not had a reply about this yet? Can you help? you can private message me if you would prefer
Thanks in advance
Png sizes
Okay do the PNG/.9.png from the ported theme have to be the same size as the ones in the Atrix drawable-hdpi?
Thanks a lot on the tutorial it helped me figure out how to edit the XMl files.
D$G said:
Okay do the PNG/.9.png from the ported theme have to be the same size as the ones in the Atrix drawable-hdpi?
Thanks a lot on the tutorial it helped me figure out how to edit the XMl files.
Click to expand...
Click to collapse
Not necessarily. As long as the .9 patch is ok then it should work. though it may look weird if theres a themed background. such as a aosp buuton on motoblur background. trial and error is your best bet there.
I'm guessing that this is a generic tutorial for most, if not all android devices?
XCellPhoneSalesRep said:
I'm guessing that this is a generic tutorial for most, if not all android devices?
Click to expand...
Click to collapse
You are correct.
If I change some icons in other .apks like the blur-res.apk, will the updater script you posted include that when it updates?
redz22 said:
If I change some icons in other .apks like the blur-res.apk, will the updater script you posted include that when it updates?
Click to expand...
Click to collapse
Yes, those are in the /system directory so it will work. Just make sure to put them in the right folder (framework). That disclaimer is more for those editing something in /data.
How to "undo" MotoBlurs Status Bar
As many of you themers out there have mostly likely noticed, Moto has screwed with the Status Bar layout in GingerBread which makes theming difficult. I will show you how to revert to the way it was in Froyo.
I will show you you how to perform these edits:
Change the Date Background back to status_bar_header_background.
Change the Title Background back to title_bar_portrait.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
1. Decompile SystemUI.apk
2. Open /res/layout/status_bar_expanded.xml
---First we'll change the Date Background.
---Out of the box it calls the drawable title_bar_portrait. In Froyo its called status_bar_header_background. So in order to go back to that we will change:
Code:
<LinearLayout android:orientation="horizontal" android:background="@drawable/title_bar_portrait" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
---to:
Code:
<LinearLayout android:orientation="horizontal" [COLOR=Red]android:background="@drawable/status_bar_header_background"[/COLOR] android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
Click to expand...
Click to collapse
---And add your status_bar_header_background png to drawables-hdpi. It can be either .png or .9.png. If it's a .9.png make sure it's in decompiled form, with the 1 pixel border, or else you will get an error during recompiling.
Click to expand...
Click to collapse
---Next we'll have the title background use the existing title_bar_portrait image instead of the shade_bgcolor.
---So we change:
Code:
<com.android.systemui.statusbar.NotificationLinearLayout android:orientation="vertical" android:id="@id/notificationLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/noNotificationsTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/ongoingTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_ongoing_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/ongoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/priorityTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_priority_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/priorityItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/latestTitle" android:background="@drawable/shade_bgcolor" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_latest_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.statusbar.NotificationLinearLayout>
---To:
Code:
<com.android.systemui.statusbar.NotificationLinearLayout android:orientation="vertical" android:id="@id/notificationLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/noNotificationsTitle" [COLOR=Red]android:background="@drawable/title_bar_portrait"[/COLOR] android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/ongoingTitle" [COLOR=Red]android:background="@drawable/title_bar_portrait"[/COLOR] android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_ongoing_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/ongoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/priorityTitle" [COLOR=Red]android:background="@drawable/title_bar_portrait"[/COLOR] android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_priority_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/priorityItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Title" android:id="@id/latestTitle" [COLOR=Red]android:background="@drawable/title_bar_portrait"[/COLOR] android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_latest_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</com.android.systemui.statusbar.NotificationLinearLayout>
Click to expand...
Click to collapse
---No need to add an image as it already exists.
Click to expand...
Click to collapse
3. Compile SystemUI.apk, be sure to delete the old status_bar_expanded.xml from the keep folder.
4. Done.
Hi,
Very cool to see someone documenting what they are doing! Keep up the good work.
Cheers!
I've been waiting for this! Love you so much...in brotherly way
I came into this android world with guns.blazing. a fresh newb and learnt to flash/root/oc etc. At one point I had stayed up 4 days in a row (using a different,but similar guide) trying to tweak a theme. Hell I was only trying to change the battery icon! I never got it,till this day. In gonna give it another shot (havent tried in months) using this guide. If finally get it,ill post a very detailed step by step video on youtube. One question though,when adding the icon I want to the framework folder,do I delete the one already there,or just let it overwrite? Thats one thing I never understood fully
Sent from my MB860 using XDA Premium App
brd912 said:
I came into this android world with guns.blazing. a fresh newb and learnt to flash/root/oc etc. At one point I had stayed up 4 days in a row (using a different,but similar guide) trying to tweak a theme. Hell I was only trying to change the battery icon! I never got it,till this day. In gonna give it another shot (havent tried in months) using this guide. If finally get it,ill post a very detailed step by step video on youtube. One question though,when adding the icon I want to the framework folder,do I delete the one already there,or just let it overwrite? Thats one thing I never understood fully
Sent from my MB860 using XDA Premium App
Click to expand...
Click to collapse
Im thinking you mean in the decompiled projects folder. you overwrite the image in that folder but during recompiling when given the prompt, you delete the old one from the keep folder. if you delete it from keep it will replace it with the one from the project.
When I decompile systemui.apk, it gave me 'an error occured'. Is it normal?

[GUIDE]Making themes for Theme Chooser (CM7) [work in progress, last update 14/4-13]

Making themes for Theme Chooser (CM7)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is a guide for making themes for Theme Chooser. Feel free to add idears of stuff I left out.
When getting a hold of what everything inside the theme-apk does, you should also be able to port CM10 themes to CM7.
Let's start by getting an overview of the content of a theme-apk.
In the root of the theme-apk we find:
Inside the res-folder there are some folders.
In the values-folder are we have a group of XMLs. This is just a quick run down. Detailed explanation comming later:
colors.xml - Defines colors as names (text) to be used in styles. Instead of writing "#ffc6c6c6" all the time, you can use a more understandable name like "@color/xperia_eclair_dark"
drawables.xml - Used to transform images in a themed app to a solid color. Eg. if we want to change the background image for an app to a red transparent filter, we can add a drawable item here with the value "88FF0000" (55 = transparency value. FF = full red. Green and Blue are both set to 00)
integers.xml - Used to set some system values, like the duration of animations, the color of LED on different occasions and more.
Read mere here: http://www.androidjavadoc.com/2.3/com/android/internal/R.integer.html
strings.xml - Here the strings for the theme (name, author etc.) are defined.
styles.xml - Here we have all the themed styles. If you know CSS in HTML you might say "Ahaaa" right away, if not it you might just say "huh?". Don't worry, I will explain later
This guide is devided into seperete parts in the folowing posts.
NOTICE: This is a first simple draft. More tips and tricks will be added to the posts over time.
2: Visual appearance in Theme Chooser etc
3: Transitions, animations and integers
4: PNGs and .9.PNGs
5: Styles and colors [updated 14/4-13]
6: XML-references [updated 14/4-13]
7: Advanced image and color animation [updated 14/4-13]
8: Compiling and signing the theme-APK
9: Best replys
Visual appearance in Theme Chooser etc
AndroidManifest.xml
This XML defines the visual part of the theme in Theme Chooser and the APK-information in Packet Installer and Application manager.
Here is an exampel:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:hasCode="false" [COLOR="Red"]android:versionCode="1" android:versionName="1 Retro"[/COLOR] android:installLocation="internalOnly" [COLOR="red"]package="com.emperordk.theme.retro"[/COLOR]
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
<uses-feature android:name="com.tmobile.software.themes" />
<application android:label="@string/theme_name" [COLOR="Blue"]android:icon="@drawable/icon"[/COLOR] android:hasCode="false" />
<theme pluto:themeId="XperiaEclair" [COLOR="Purple"]pluto:styleId="@style/Eclair"[/COLOR] [COLOR="Green"]pluto:name="@string/theme_name"[/COLOR] pluto:preview="@drawable/preview" pluto:wallpaperImage="@drawable/wallpaper" pluto:author="@string/author" pluto:copyright="@string/copyright" pluto:styleName="@string/style_appearance_name">
<meta-data android:name="com.tmobile.theme.redirections" android:resource="@xml/redirections" />
</theme>
</manifest>
The first thing the XML does, is define the theme version, and package ID (the red parts above).
To avoid collision with other apps and themes it's very important not to use a package ID that is used by other apps.
Eg. if I would make a retro-theme I would use this package ID:
package="com.emperordk.theme.xperiaeclair"
Click to expand...
Click to collapse
or something like that
It's not very likely, that this ID is used by any other app
Next we notice, that the name of the theme comes from a string (gren part), so this is edited elswhere, se right below in this post.
In the same TAG the APK-icon is also defined (blue part).
"@drawable/icon" is a reference to the file "res/drawable-ldpi/icon.png" (asuming we make a LDPI-theme).
If the file does not exists in drawable-ldpi, Android looks for it in drawable-mdpi or drawable-hdpi.
Making a LDPI theme, everything should be made in true LDPI for faster and smoother response (Android resizes from MDPI and HDPI to LDPI, and that takes up some CPU-power).
Next we set the parrent style (purple part). This style must exist in the styles.xml (later in this guide).
In the same line a lot of strings are fetched, like theme name and so on, we also define the reference to the preview image the same way as the icon was defined, we must have a file for portrait and landscape. (Notice: wallpaper will not be set by Theme Chooser in CM7).
You should not edit any of the TAGs and/or arguments that are not marked by a color above.
Editing @xml/redirections will have no effect. Theme Chooser will use redirections.xml anyway (I realy want to be able to set the redirection master-XML to another XML-file, but I have not yet found the part of Theme Chooser where I can make it read the string from AndroidManifest.xml).
We can from this XML identify the existence of the folowing files:
res/drawable-ldpi/icon.png
res/drawable-hdpi/preview.png
res/drawable-land-mdpi/preview.png
YES! For some reason place the portrait-preview in "drawable-hdpi" and the landscape-preview in "drawable-land-mdpi", or Theme Chooser will return an error.
The size of LDPI icons is 36 x 36 px
The LDPI prewiew image should be 135 x 209 px (if lager, Android will just resize)
res/values/strings.xml
Here strings for APKs are defined.
As a theme APK realy doesn't do anything but being a container for theme-parts, there are only a very few strings.
This would be the content for a Retro-theme made by me:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Xperia Eclair Retro</string>
<string name="theme_name">Xperia Eclair Retro</string>
<string name="style_appearance_name">Retro</string>
<string name="author">Emperor</string>
<string name="copyright">2013</string>
</resources>
Transitions, animations and integers
XMLs that controls how transitions and animations looks are placed in the anim-folder.
integers.xml is used to set some system values, like the duration of animations, the color of LED on different occasions and more.
Read mere here: http://www.androidjavadoc.com/2.3/com/android/internal/R.integer.html
---- MORE COMMING -----
PNGs and .9.PNGs
There are meny folders for PNG files. Mostly these will be present in a theme:
drawable-hdpi
drawable-land-ldpi
drawable-land-mdpi
drawable-land-mdpi-finger
drawable-ldpi
drawable-mdpi
drawable-mdpi-finger
Here all the PNGs used by the themed apps are placed.
Making a theme for an LDPI device, it would be best to resize everything to true LDPI. This way, the device does not have to make the resizing it self, and it will speed up the smoothnes of using the device. Also the finished APK will take up less space.
Read more about screen-sizes here: http://developer.android.com/guide/practices/screens_support.html
Scaling ratio for LDPI:MDPI:HDPI:XHDPI is 3:4:6:8
• 36x36 for low-density
• 48x48 for medium-density
• 72x72 for high-density
• 96x96 for extra high-density
Notice: Almost all themes also got folders for MDPI and/or HDPI even if they claim to be LDPI-theme. In most cases it has no influence on the visuel look.
/drawable-finger-ldpi etc
Well, the "finger"-part is called a "qualifier" and this qualifier should actually not be nessesery for our devises to use.
This qualifier makes it explicit, that PNGs in this folder are for touchscreen devices, doh!. This makes it possible to have different PNGs for touchscreen and non-touchscreen devices.
But other qualifiers than "finger" can be usefull, eg. if we draw some letters on a PNG, that has to be different for different languages, or the PNG must look different because layouts are also different eg. left-to-right og right-to-left text, we can make language-dependent qualifiers.
This is advanced theming, LOL. List of qualifiers read more here: http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources
If you are theming an app that holds PNGs in a "finger" folder, just do the same in your theme.
How to edit .9.PNG read more here: http://forum.xda-developers.com/showthread.php?t=2033415
Styles and colors
styles.xml
When you for the first time open and look at the content of styles.xml you might regret starting to learn about theming.
But it's not that hard first you understand what it's all about.
Lets start with a very simple example.
We got this simple app: Calculator.apk with the package ID: com.android.calculator2
NOTICE: Some genius made a fixed black background in the layout-XML for this app. That's why the background can't be themed, but I fixed that. Grab the fixed Calculator.apk here. http://www.mediafire.com/?8x4q08tpcqnl2jf
Calculator.apk looks like this unthemed:
The steps to learn how to theme that app would be to decompile it and then read it's "AndroidManifest.xml"
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="10" android:versionName="2.3.7" package="com.android.calculator2"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="10" />
<original-package android:name="com.android.calculator2" />
<application android:label="@string/app_name" android:icon="@drawable/icon">
<activity [COLOR="Red"]android:theme="@android:style/Theme.Black.NoTitleBar"[/COLOR] android:name="Calculator">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Here we learn that it's themed by the style named "Theme.Black.NoTitleBar" from "@android" (red line) wich is the same as "framework-res.apk".
So we decompile "framework-res.apk" and open "res/values/styles.xml" and look for a style named "Theme.Black.NoTitleBar" and find this:
Code:
<style name="Theme.Black.NoTitleBar" parent="@style/Theme.Black">
<item name="windowNoTitle">true</item>
</style>
It doesn't look of much, but it tells us, it enheriets it's styles from "Theme.Black". Aha! We find it and it looks like this:
Code:
<style name="Theme.Black" parent="@style/Theme">
<item name="colorBackground">@color/black</item>
<item name="windowBackground">@color/black</item>
</style>
It should be very obvious, that the style makes a solid black background. Let's change that from our theme.
First lets set up a string for a transparent color. We will almost for sure need that a lot anyway. Chances are, that you a using an exsisting theme as a base for your theme, and most likely it's already defined.
In our theme-APK-folder we open "res/values/colors.xml" and add this inside the resources-tags:
Code:
<resources>
...
<color name="transparent">#00000000</color>
...
</resources>
Still in our theme-APK-folder we open "res/values/styles.xml" and add this inside the resources-tags:
Code:
<resources>
...
<style name="Theme.Black" parent="@android:style/Theme.Black">
<item name="android:colorBackground">@android:color/transparent</item>
<item name="android:windowBackground">@drawable/semc_bg</item>
</style>
...
</resources>
Notice the difference in how to write the style in our theme and how it was written in the original framework-res.apk!
Lets explain what it does:
First of all we give it a name. It's smart to keep the same names to make it easy to remember what this is for.
Next we add an argument that inheriets styles from the original style from the original framework-res.apk. It's not nessesery for this style as we change everything, but for other styles where we only will change a few things this is smart.
The two item-lines then sets background-color to transparent and sets background-image to "res/drawable-ldpi/semc_bg.png" from our theme-APK.
Final step is to add style-reference. In our theme-APK-folder we open "res/xml/android.xml" and add this line inside the resource-redirections-tags
Code:
<resource-redirections>
...
<item name="style/Theme.Black">@style/Theme.Black</item>
...
</resource-redirections>
Now Theme Chooser will replace the style in framework-res.apk with the style from our theme-APK.
We have made our first themed style (In post #6 we will also theme the PNGs of Calculator.apk). The result looks like this:
So your next question will be: What all the style-names in styles.xml are responsible for different texts etc.?
Well, I will gather all info about that. Untill then read here:
http://developer.android.com/guide/topics/ui/themes.html
https://android.googlesource.com/pl...s/heads/master/core/res/res/values/styles.xml
------ for geeks ------
The problem is in Calculator.apk in the file main.xml in folders layout-land and layout-port.
At the top of both XMLs we find these lines:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:background="#[COLOR="red"][B]ff[/B][/COLOR]000000" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
...
The problem is the part highlighted in red.
This defines a non-transparent full black background for the entire layout of the app.
The first 2 hex ff is = no transparency. 00 would = full transparency. The rest is just normal hex-RGB-color-code.
Yes, the app starts by getting it's layout as described in my link in post #5 above. This is all fine. But then on top of that, we get a LinearLayout-container with solid black background, covering any other background defines by our styles... not clever at all LOL.
The fix i made in link above is just to change the background to full transparency, like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:background="#[COLOR="Red"][B]00[/B][/COLOR]000000" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
...
XML-references [updated 13/2-13]
In the xml-folder we have all the XMLs that are responsible for theming apps.
We already had a sneak-peek at res/xml/android.xml above. Let's see how the redirection-XMLs work.
The master-XML is "redirections.xml". Here each themed app is referenced to an XML.
All themed app then have it's own XML that controles how the app is themed - both PNGs from drawable-folders and styles from "res/values/styles.xml".
It's not only standard apps that can be themed. Any app, also from Google Play, can be themed.
The most simple theme is just to change the apps icon in the app drawer. Most themes for the stock email app only changes the icon.
More theming would be to exchange drawables (PNGs), and the next more advanced step is theming styles, and if you are totally crazy you also make a lot of qualifier dependent theming (mostly language dependent).
This is an example from a theme, that themes all standard apps:
Code:
<?xml version="1.0" encoding="utf-8"?>
<theme-redirections
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
[COLOR="Red"]<package-redirections android:name="android" android:resource="@xml/android" android:minSdkVersion="7" />[/COLOR]
<package-redirections android:name="com.android.systemui" android:resource="@xml/com_android_systemui" android:minSdkVersion="7" />
<package-redirections android:name="com.android.phone" android:resource="@xml/com_android_phone" android:minSdkVersion="7" />
<package-redirections android:name="com.android.settings" android:resource="@xml/com_android_settings" android:minSdkVersion="7" />
<package-redirections android:name="com.android.browser" android:resource="@xml/com_android_browser" android:minSdkVersion="7" />
<package-redirections android:name="com.android.calendar" android:resource="@xml/com_android_calendar" android:minSdkVersion="7" />
<package-redirections android:name="com.android.music" android:resource="@xml/com_android_music" android:minSdkVersion="7" />
<package-redirections android:name="com.android.camera" android:resource="@xml/com_android_camera" android:minSdkVersion="7" />
<package-redirections android:name="com.android.mms" android:resource="@xml/com_android_mms" android:minSdkVersion="7" />
<package-redirections android:name="com.android.contacts" android:resource="@xml/com_android_contacts" android:minSdkVersion="7" />
<package-redirections android:name="com.android.calculator2" android:resource="@xml/com_android_calculator2" android:minSdkVersion="7" />
<package-redirections android:name="com.android.deskclock" android:resource="@xml/com_android_deskclock" android:minSdkVersion="7" />
<package-redirections android:name="com.cooliris.media" android:resource="@xml/com_cooliris_media" android:minSdkVersion="7" />
<package-redirections android:name="com.android.email" android:resource="@xml/com_android_email" android:minSdkVersion="7" />
<package-redirections android:name="com.android.inputmethod.latin" android:resource="@xml/com_android_inputmethod_latin" android:minSdkVersion="7" />
<package-redirections android:name="com.google.android.apps.genie.geniewidget" android:resource="@xml/com_google_android_apps_genie_geniewidget" android:minSdkVersion="7" />
<package-redirections android:name="com.sonyericsson.home" android:resource="@xml/com_sonyericsson_home" android:minSdkVersion="7" />
<package-redirections android:name="com.android.providers.downloads.ui" android:resource="@xml/com_android_providers_downloads_ui" android:minSdkVersion="7" />
<package-redirections android:name="com.android.packageinstaller" android:resource="@xml/com_android_packageinstaller" android:minSdkVersion="7" />
</theme-redirections>
The reference to the framework-res.apk is a little special. See the red line at the top.
The rest uses the apps package-ID. Knowing the package-ID you can theme any app. Also apps from Google Play.
In each of the XMLs for each app, all file-redirections are defined.
So we want to theme Calculator.apk to make it look like in stock Eclair ROM.
We already themed the style above, now we want to theme the icon and all images used by Calculator.apk.
In the decompiled Calculator.apk from CM7 ROM we find 2 drawable-folders:
drawable
- blue_button.xml
- button.xml
drawable-mdpi
- advanced.png
- clear_history.png
- icon.png
- simple.png
In the decompiled Calculator.apk from stock Eclair ROM we find these 2 drawable-folders:
drawable
- blue_button.xml
- button.xml
- transparent_button.xml
drawable-ldpi
- advanced.png
- calculator_button.9.png
- calculator_button_pressed.9.png
- clear_history.png
- icon.png
- simple.png
First we notice that the 3 normal PNG files looks exactly the same, aside from MDPI/LDPI. In this case there is no need for theming those.
Also notice there is no folder for landscape, as there is no need for a different looking PNG/XML.
But we want to theme the icon and the two XMLs from drawable. Remember, that XMLs in the drawable-folder are seen as any other PNG in a drawable-folder.
The icon from stock Eclair is renamed into something easy to understand, like ic_launcher_calculator2.png, and copied to our theme-apk-folder res/drawable-ldpi.
We will also copy the two .9.PNGs, as we will use them to make button-animations (explained in next post below).
The content of "res/xml/com_android_calculator2.xml" will look like this for theming the icon and the two XMLs.
Code:
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
[COLOR="red"]<item name="drawable/icon">@drawable/ic_launcher_calculator2</item>[/COLOR]
<item name="drawable/blue_button">@drawable/calculator_button</item>
<item name="drawable/button">@drawable/calculator_button</item>
</resource-redirections>
The red line makes a redirection for the icon as shown in the app-drawer to a PNG in our theme-APK "res/drawable-ldpi/ic_launcher_calculator2.png".
We also make redirections for the XML-drawables, but as all buttons looks the same in stock Eclair we redirect to the same file for both button-types. Read more in next post about Advanced image and color animation.
Notice, that we do not make any redirections to the two .9.PNGs as they do not replace anything.
Advanced image and color animation [updated 14/4-13]
/color
The "color"-folder is a somewhat misleading foldername. Here we place XML-files that are used instead af a HEX-color-code. Yes, the XML-file it self is the color.
Normaly to set a text color in a style-class, you would use a tag like this:
Code:
<item name="android:textColor">#ffffffff</item>
Notice 8 HEX-digits.
This will just make the text full bright white. The first 2 hex-digits sets transparancy to "ff" = no transparency (00 = full transparency). The next 6 digits is the color in RGB-format, 2 hex-digits for each (red, green and blue).
But we could also set the color of some text to - not a HEX-color-code, but - the name of an XML-file in the "color" folder, like this:
Code:
<item name="android:textColor">@color/eclair_button_default</item>
This tag sets the text color to the XML-file "res/color/eclair_button_default.xml". The content of the XML-file can then define colors for different stages like selected, pressed etc.
In this way we can have the color of the text change when eg. a button is tapped. Cool stuff right?
---- MORE COMMING -----
/drawable
This folder is used just like the "color" folder, just for PNGs instead of colors, so eg. the PNG will change when tapped.
Normally the XML that theme an app will make a reference to a new PNG-file from the theme-APKs drawable-ldpi folder, but if no PNG with the refered name exists, Android looks for an XML-file in "res/drawable" instead.
The content of the XML-file can then define PNGs for different stages like selected, pressed etc.
Theming Calculator.apk we came across two XMLs in the drawable-folder.
The content of the 2 XMLs in Calculator.apk from CM7 ROM looks like this:
button.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#ff000000" android:endColor="#ff333333" android:angle="90.0" />
<corners android:radius="0.0dip" />
</shape>
blue-button.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#ff071622" android:endColor="#ff253541" android:angle="90.0" />
<corners android:radius="0.0dip" />
</shape>
As noted, the XMLs defines a gradient color for two different colors (blue and black), that looks like this:
When tapped there is no button-animation aside from edge-glow when relesed.
The chalange is to make it look like in stock Eclair ROM; transparent and when tapped the whole button glows bright:
The two steps (normal and pressed) comes from two .9.PNGs mentioned above.
In Calculator.apk from stock Eclair ROM this is accomplished by the use of a drawable-XML:
transparent_button.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false" android:drawable="@drawable/calculator_button" />
<item android:state_pressed="true" android:drawable="@drawable/calculator_button_pressed" />
</selector>
The other two XMLs are not used, but must be leftovers from the original devs.
Looking at the XML-code, we notice a fairly simple way of making animations in buttons. We have got two item-lines acording to a pressed or not-pressed state.
Thats all there is to it.
The drawables refered to is the two .9.PNGs
So we rename transparent_button.xml to calc_button.xml (carefull not to use filenames already used by other drawables like another PNG) and copy it to "res/drawable" in our theme-apk-folder.
The result looks like this with the old icon, look and feel from the stock Eclair ROM:
You might notice a slight difference in spacing betwean the buttons from the stock one. Well, we will fix this too in another post - here in this thread - soon.
HA! Not a dry eye in the room.
Compiling and signing the theme-APK
Get all tools here: http://forum.xda-developers.com/showthread.php?t=2033415
--------- MORE COMMING SOON ---------
References to best replies
Reserved for ref to best replies in this thread :good:
thanks emperor
Renz29 said:
thanks emperor
Click to expand...
Click to collapse
i will add more examples and images soon in every section
Thank you!
☜ Sent from my Xperia ☞
Just updated posts #5, #6 and #7
How I can change the images of a theme? (res / drawable)
Thanks for your reply.
can you make this theme a theme chooser for my cm10? please..
View attachment 2176394
i like only the icons of that theme..
thanks

[MOD][GUIDE] eXtended CM10 Settings

eXtended CM10 Settings.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Featured.
Superuser Shortcut
DSPManager Shortcut
USB Connections Shortcut
Tethering Shortcut
Device owner info
Recovery version
Click to expand...
Click to collapse
Things you'll need.
PC or Laptop
apktool, zipalign and others
WinRAR or WinZip
Notepad++
Patience!
Click to expand...
Click to collapse
Installing apkTool.
STEP 1
You must install apktool to your PC from HERE and other tools HERE
Extract it to a same directory
Then, copy cmd from Windows/System32 Directory (ex. C:\Windows\System32) and move it your apktool directory​
STEP 2
Download zipalign from HERE, move it to Windows Directory (ex. C:\Windows)​
Superuser shortcut.
STEP 1
Copy your framework-res.apk from system/framework and Settings.apk from /system/app/ then place it in your apktool directory​
STEP 2
Open cmd in your apktool directory, type
Code:
apktool if framework-res.apk
then
Code:
apktool d Settings.apk
STEP 3
Go to Settings\res\xml
Open settings_headers.xml with Notepad++
Go to this
Code:
<header android:icon="@drawable/ic_settings_themes" android:id="@id/themes_settings" android:title="@string/themes_settings_title">
<intent android:targetPackage="com.tmobile.themechooser" android:action="android.intent.action.MAIN" android:targetClass="com.tmobile.themechooser.ThemeChooser" />
</header>
add a line below
Code:
<header android:icon="@drawable/ic_settings_superuser" android:id="@id/superuser_settings" android:title="@string/superuser_settings_title">
<intent android:targetPackage="[COLOR="Red"](Referring to your Superuser app, go to post [URL="http://forum.xda-developers.com/showpost.php?p=41069458&postcount=3"]#3[/URL])[/COLOR]" android:action="android.intent.action.MAIN" android:targetClass="[COLOR="red"](Referring to your Superuser app, go to post [URL="http://forum.xda-developers.com/showpost.php?p=41069458&postcount=3"]#3[/URL])[/COLOR]" />
</header>
so it look like this
Code:
<header android:icon="@drawable/ic_settings_themes" android:id="@id/themes_settings" android:title="@string/themes_settings_title">
<intent android:targetPackage="com.tmobile.themechooser" android:action="android.intent.action.MAIN" android:targetClass="com.tmobile.themechooser.ThemeChooser" />
</header>
<header android:icon="@drawable/ic_settings_superuser" android:id="@id/superuser_settings" android:title="@string/superuser_settings_title">
<intent android:targetPackage="[COLOR="Red"](Referring to your Superuser app, go to post [URL="http://forum.xda-developers.com/showpost.php?p=41069458&postcount=3"]#3[/URL])[/COLOR]" android:action="android.intent.action.MAIN" android:targetClass="[COLOR="Red"](Referring to your Superuser app, go to post [URL="http://forum.xda-developers.com/showpost.php?p=41069458&postcount=3"]#3[/URL])[/COLOR]" />
</header>
and save​
STEP 4
Download the Superuser icon .zip in the attachment below
Extract it to Settings\res\drawable-mdpi​
STEP 5
Go to Settings\res\values
Open ids.xml with Notepad++
Go to this
Code:
<item type="id" name="themes_settings">false</item>
add a line below
Code:
<item type="id" name="superuser_settings">false</item>
so it look like this
Code:
<item type="id" name="themes_settings">false</item>
<item type="id" name="superuser_settings">false</item>
and save​
STEP 6
Go to Settings\res\values
Open strings.xml with Notepad++
Go to this
Code:
<string name="themes_settings_title">Themes</string>
add a line below
Code:
<string name="superuser_settings_title">Superuser</string>
so it look like this
Code:
<string name="themes_settings_title">Themes</string>
<string name="superuser_settings_title">Superuser</string>
and save​
STEP 7
Open cmd in your apktool directory, type
Code:
apktool b Settings al.apk
then open al.apk and Settings.apk with WinRAR, copy META-INF folder and AndroidManifest.xml from SystemUI.apk to al.apk, when it ask to compress click OK​
STEP 8
Open cmd in your apktool directory, type
Code:
zipalign -v 4 al.apk Settingsmod.apk
STEP 9
Move your Settingsmod.apk to your phone, rename to Settings.apk, move it to /system/app/ and change permission to rw-r--r--
Then reboot​
DSPManager shortcut.
STEP 1
If you have decompiled Settings.apk, Go to Settings\res\xml
Open settings_headers.xml with Notepad++
Go to this
Code:
<header android:icon="@drawable/ic_settings_themes" android:id="@id/themes_settings" android:title="@string/themes_settings_title">
<intent android:targetPackage="com.tmobile.themechooser" android:action="android.intent.action.MAIN" android:targetClass="com.tmobile.themechooser.ThemeChooser" />
</header>
add a line below
Code:
<header android:icon="@drawable/ic_settings_dspmanager" android:id="@id/dspmanager_settings" android:title="@string/dspmanager_settings_title">
<intent android:targetPackage="com.bel.android.dspmanager" android:action="android.intent.action.MAIN" android:targetClass="com.bel.android.dspmanager.activity.DSPManager" />
</header>
so it look like this
Code:
<header android:icon="@drawable/ic_settings_themes" android:id="@id/themes_settings" android:title="@string/themes_settings_title">
<intent android:targetPackage="com.tmobile.themechooser" android:action="android.intent.action.MAIN" android:targetClass="com.tmobile.themechooser.ThemeChooser" />
</header>
<header android:icon="@drawable/ic_settings_dspmanager" android:id="@id/dspmanager_settings" android:title="@string/dspmanager_settings_title">
<intent android:targetPackage="com.bel.android.dspmanager" android:action="android.intent.action.MAIN" android:targetClass="com.bel.android.dspmanager.activity.DSPManager" />
</header>
and save​
STEP 2
Download the DSPManager icon .zip in the attachment below
Extract it to Settings\res\drawable-mdpi​
STEP 3
Go to Settings\res\values
Open ids.xml with Notepad++
Go to this
Code:
<item type="id" name="themes_settings">false</item>
add a line below
Code:
<item type="id" name="dspmanager_settings">false</item>
so it look like this
Code:
<item type="id" name="themes_settings">false</item>
<item type="id" name="dspmanager_settings">false</item>
and save​
STEP 4
Go to Settings\res\values
Open strings.xml with Notepad++
Go to this
Code:
<string name="themes_settings_title">Themes</string>
add a line below
Code:
<string name="dspmanager_settings_title">Equalizer</string>
so it look like this
Code:
<string name="themes_settings_title">Themes</string>
<string name="dspmanager_settings_title">Equalizer</string>
and save​
STEP 5
Open cmd in your apktool directory, type
Code:
apktool b Settings al.apk
then open al.apk and Settings.apk with WinRAR, copy META-INF folder and AndroidManifest.xml from SystemUI.apk to al.apk, when it ask to compress click OK​
STEP 6
Open cmd in your apktool directory, type
Code:
zipalign -v 4 al.apk Settingsmod.apk
STEP 7
Move your Settingsmod.apk to your phone, rename to Settings.apk, move it to /system/app/ and change permission to rw-r--r--
Then reboot​
USB Connections shortcut.
STEP 1
If you have decompiled Settings.apk, Go to Settings\res\xml
Open settings_headers.xml with Notepad++
Go to this
Code:
<header android:icon="@drawable/ic_settings_applications" android:id="@id/application_settings" android:title="@string/applications_settings" android:fragment="com.android.settings.applications.ManageApplications" />
add a line below
Code:
<header android:icon="@drawable/ic_settings_usb" android:id="@id/usb_settings" android:title="@string/storage_title_usb" android:fragment="com.android.settings.deviceinfo.UsbSettings" />
so it look like this
Code:
<header android:icon="@drawable/ic_settings_applications" android:id="@id/application_settings" android:title="@string/applications_settings" android:fragment="com.android.settings.applications.ManageApplications" />
<header android:icon="@drawable/ic_settings_usb" android:id="@id/usb_settings" android:title="@string/storage_title_usb" android:fragment="com.android.settings.deviceinfo.UsbSettings" />
and save​
STEP 2
Download the USB icon .zip in the attachment below
Extract it to Settings\res\drawable-mdpi​
STEP 3
Go to Settings\res\values
Open ids.xml with Notepad++
Go to this
Code:
<item type="id" name="application_settings">false</item>
add a line below
Code:
<item type="id" name="usb_settings">false</item>
so it look like this
Code:
<item type="id" name="application_settings">false</item>
<item type="id" name="usb_settings">false</item>
and save​
STEP 4
Go to Settings\res\values
Open strings.xml with Notepad++
Go to this
Code:
<string name="storage_title_usb">[COLOR="Red"]USB computer connection[/COLOR]</string>
change to
Code:
<string name="storage_title_usb">[COLOR="Red"]USB connection[/COLOR]</string>
and save​
STEP 5
Open cmd in your apktool directory, type
Code:
apktool b Settings al.apk
then open al.apk and Settings.apk with WinRAR, copy META-INF folder and AndroidManifest.xml from SystemUI.apk to al.apk, when it ask to compress click OK​
STEP 6
Open cmd in your apktool directory, type
Code:
zipalign -v 4 al.apk Settingsmod.apk
STEP 7
Move your Settingsmod.apk to your phone, rename to Settings.apk, move it to /system/app/ and change permission to rw-r--r--
Then reboot​
Tethering shortcut.
STEP 1
If you have decompiled Settings.apk, Go to Settings\res\xml
Open settings_headers.xml with Notepad++
Go to this
Code:
<header android:icon="@drawable/ic_settings_bluetooth2" android:id="@id/bluetooth_settings" android:title="@string/bluetooth_settings_title" android:fragment="com.android.settings.bluetooth.BluetoothSettings" />
add a line below
Code:
<header android:icon="@drawable/ic_settings_tether" android:id="@id/tether_settings" android:title="@string/tether_settings_title" android:fragment="com.android.settings.TetherSettings" />
so it look like this
Code:
<header android:icon="@drawable/ic_settings_bluetooth2" android:id="@id/bluetooth_settings" android:title="@string/bluetooth_settings_title" android:fragment="com.android.settings.bluetooth.BluetoothSettings" />
<header android:icon="@drawable/ic_settings_tether" android:id="@id/tether_settings" android:title="@string/tether_settings_title_all" android:fragment="com.android.settings.TetherSettings" />
and save​
STEP 2
Download the Tether icon .zip in the attachment below
Extract it to Settings\res\drawable-mdpi​
STEP 3
Go to Settings\res\values
Open ids.xml with Notepad++
Go to this
Code:
<item type="id" name="bluetooth_settings">false</item>
add a line below
Code:
<item type="id" name="tether_settings">false</item>
so it look like this
Code:
<item type="id" name="bluetooth_settings">false</item>
<item type="id" name="tether_settings">false</item>
and save​
STEP 4
Go to Settings\res\values
Open strings.xml with Notepad++
Go to this
Code:
<string name="bluetooth_settings_title">Bluetooth</string>
add a line below
Code:
<string name="tether_settings_title">Tethering</string>
so it look like this
Code:
<string name="bluetooth_settings_title">Bluetooth</string>
<string name="tether_settings_title">Tethering</string>
and save​
STEP 5
Open cmd in your apktool directory, type
Code:
apktool b Settings al.apk
then open al.apk and Settings.apk with WinRAR, copy META-INF folder and AndroidManifest.xml from SystemUI.apk to al.apk, when it ask to compress click OK​
STEP 6
Open cmd in your apktool directory, type
Code:
zipalign -v 4 al.apk Settingsmod.apk
STEP 7
Move your Settingsmod.apk to your phone, rename to Settings.apk, move it to /system/app/ and change permission to rw-r--r--
Then reboot​
Device owner info.
STEP 1
If you have decompiled Settings.apk, Go to Settings\res\xml
Open device_info_settings.xml with Notepad++
Go to this
Code:
<Preference android:title="@string/firmware_version" android:key="firmware_version" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
add a line below
Code:
<Preference android:title="@string/device_owner" android:key="device_user" android:summary="@string/device_owner_info" style="?android:preferenceInformationStyle" />
so it look like this
Code:
<Preference android:title="@string/firmware_version" android:key="firmware_version" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/device_owner" android:key="device_owner" android:summary="@string/device_owner_info" style="?android:preferenceInformationStyle" />
and save​
STEP 2
Go to Settings\res\values
Open strings.xml with Notepad++
Go to this
Code:
<string name="device_info_default">Unknown</string>
add a line below
Code:
<string name="device_owner">Device owner</string>
<string name="device_owner_info">[COLOR="Red"]Your Name[/COLOR]</string>
so it look like this
Code:
<string name="device_info_default">Unknown</string>
<string name="device_owner">Device owner</string>
<string name="device_owner_info">[COLOR="Red"]Your Name[/COLOR]</string>
and save​
STEP 3
Open cmd in your apktool directory, type
Code:
apktool b Settings al.apk
then open al.apk and Settings.apk with WinRAR, copy META-INF folder and AndroidManifest.xml from SystemUI.apk to al.apk, when it ask to compress click OK​
STEP 4
Open cmd in your apktool directory, type
Code:
zipalign -v 4 al.apk Settingsmod.apk
STEP 5
Move your Settingsmod.apk to your phone, rename to Settings.apk, move it to /system/app/ and change permission to rw-r--r--
Then reboot​
Recovery version.
STEP 1
If you have decompiled Settings.apk, Go to Settings\res\xml
Open device_info_settings.xml with Notepad++
Go to this
Code:
<Preference android:title="@string/mod_version" android:key="mod_version" android:summary="@string/mod_version_default" style="?android:preferenceInformationStyle" />
add a line below
Code:
<Preference android:title="@string/recovery_version" android:key="recovery_version" android:summary="@string/recovery_version_default" style="?android:preferenceInformationStyle" />
so it look like this
Code:
<Preference android:title="@string/mod_version" android:key="mod_version" android:summary="@string/mod_version_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/recovery_version" android:key="recovery_version" android:summary="@string/recovery_version_default" style="?android:preferenceInformationStyle" />
and save​
STEP 2
Go to Settings\res\values
Open strings.xml with Notepad++
Go to this
Code:
<string name="mod_version_default">Unknown</string>
add a line below
Code:
<string name="recovery_version">Recovery version</string>
<string name="recovery_version_default">[COLOR="Red"]Your Recovery[/COLOR]</string>
so it look like this
Code:
<string name="mod_version_default">Unknown</string>
<string name="recovery_version">Recovery version</string>
<string name="recovery_version_default">[COLOR="Red"]Your Recovery[/COLOR]</string>
and save​
STEP 3
Open cmd in your apktool directory, type
Code:
apktool b Settings al.apk
then open al.apk and Settings.apk with WinRAR, copy META-INF folder and AndroidManifest.xml from SystemUI.apk to al.apk, when it ask to compress click OK​
STEP 4
Open cmd in your apktool directory, type
Code:
zipalign -v 4 al.apk Settingsmod.apk
STEP 5
Move your Settingsmod.apk to your phone, rename to Settings.apk, move it to /system/app/ and change permission to rw-r--r--
Then reboot​
Superuser app.
Superuser by ClockWorkMod (Koushik Dutta)
Code:
android:targetPackage="com.koushikdutta.superuser"
android:targetClass="com.koushikdutta.superuser.MainActivity"
Superuser by ChainsDD
Code:
android:targetPackage="com.noshufou.android.su"
android:targetClass="com.noshufou.android.su.Su"
SuperSU by Chainfire
Code:
android:targetPackage="eu.chainfire.supersu"
android:targetClass="eu.chainfire.supersu.MainActivity"
Click to expand...
Click to collapse
Credits to.
Quinny899 for his adding items guide HERE
Koush for his awesome Superuser app HERE
ChainsDD for his awesome Superuser app HERE
Chainfire for his awesome SuperSU app HERE​
@sandy7 already taught this guide in this thread
your thread is some kind of spam in my view
always use search
yamin8000 said:
@sandy7 already taught this guide in this thread
your thread is some kind of spam in my view
always use search
Click to expand...
Click to collapse
But I didn't show how to add su shortcut....
So I think its not a spam..and plz do respect for this tut..
Any how OP nice explaination :thumbup::thumbup:
Sent from my SK17i using xda premium
sandy7 said:
But I didn't show how to add su shortcut....
So I think its not a spam..and plz do respect for this tut..
Any how OP nice explaination :thumbup::thumbup:
Sent from my SK17i using xda premium
Click to expand...
Click to collapse
i dont think adding superuser to settings is different from adding CPU option
both of them are same way
only different is name of package that can anybody find it in android-manifest
if this isn't true somebody must teach us how to add all of play store apps to settings in separate guides :laugh:
The guy atleast put in efforts to type n cared to share his knowledge
Respect the person for that mate!
And it is not a spam ...by any means...
Atleast it's way better than spams by noobs
Sent from my MT11i using xda premium
works great.... Owner in settings!
What about integrating Superuser to Settings .. as it is in Cm roms ??
sidharth.gtm said:
What about integrating Superuser to Settings .. as it is in Cm roms ??
Click to expand...
Click to collapse
Yeah I'm working on it now,,
Diaz1999 said:
Yeah I'm working on it now,,
Click to expand...
Click to collapse
Bro that would be real challenge..
and please teach us with great tutorials
sidharth.gtm said:
Bro that would be real challenge..
and please teach us with great tutorials
Click to expand...
Click to collapse
Please you or someone upload Settings.apk which contain Superuser integration ( usually CM10.1 Settings.apk ), I'll try to port it to our device CM10 Settings
via XDA for Timescape™
Diaz1999 said:
Please you or someone upload Settings.apk which contain Superuser integration ( usually CM10.1 Settings.apk ), I'll try to port it to our device CM10 Settings
via XDA for Timescape™
Click to expand...
Click to collapse
here you go bro !
sidharth.gtm said:
here you go bro !
Click to expand...
Click to collapse
Hoaahem,, now is 12.54 AM in my time zone, I'll try it tomorrow
via XDA for Timescape™
In PA2.5.7, that is based on CM10, in settings we have a option to make the status bar to adapt different transparent levels, so can we get that option in CM settings??
stanlin salu said:
In PA2.5.7, that is based on CM10, in settings we have a option to make the status bar to adapt different transparent levels, so can we get that option in CM settings??
Click to expand...
Click to collapse
I could make a shortcut for that, but you must follow this guide first, then the shortcut will be placed in System > Status bar > Change Transparency will open Statusbar Tweaks inside TweakBox Xposed Module
Can you make tutorial for tabbed settings?
i know there's one on XDA, but i guess that thread doesn't have support anymore and the tutorial is confusing :fingers-crossed:
awesome tut btw
stanlin salu said:
In PA2.5.7, that is based on CM10, in settings we have a option to make the status bar to adapt different transparent levels, so can we get that option in CM settings??
Click to expand...
Click to collapse
I've done make it, but I'm sorry I'm sick at home, have a cold and flu , I'll write the guide later
lanvrc said:
Can you make tutorial for tabbed settings?
i know there's one on XDA, but i guess that thread doesn't have support anymore and the tutorial is confusing :fingers-crossed:
awesome tut btw
Click to expand...
Click to collapse
I've found that guide, I'll try it later
via XDA for Timescape™
work on cm10?
Yes, look on the title...
Sent from my Xperia Mini Pro using xda app-developers app

[TUTORIAL] [MOD] How to add Extra Options in About Sections

Hello Today I am Showing How to add Extra Options in Settings CPU Info Screen Resolution Mem Info Swap Mem Info I will Update This Thread with New Options So Let"s Start
Requirement:
Apktool http://forum.xda-developers.com/show....php?t=1755243
Settings.apk From Your Phone
Nice Brain to Understand
Credits:
My Friends Aryne Neil Carlno Cabatan
Instructions:
Step 1 :- Pull Your Settings from Your Phone
Step 2 :- Decompile The Settings.apk
Step 3 :- Merged The Your Settings with My Zip
Step 4 :- Open Values/strings.xml
Step 5 :- Add This
Code:
<string name="cpu_info">CPU info</string>
<string name="mem_info">Mem info (avail/total)</string>
<string name="swap_mem_info">Swap mem info (avail/total)</string>
<string name="device_screen_resolution">Screen resolution</string>
Step 6 :- Open xml/device_info_settings
Step 7 :- Remove All lines
Step 8 :- Add This
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/about_settings"
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen android:title="@string/device_status" android:key="status_info" android:summary="@string/device_status_summary">
<intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.deviceinfo.Status" />
</PreferenceScreen>
<Preference android:title="@string/model_number" android:key="device_model" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/firmware_version" android:key="firmware_version" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/baseband_version" android:key="baseband_version" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/kernel_version" android:key="kernel_version" android:summary="@string/device_info_default" />
<Preference android:title="@string/cpu_info" android:key="device_cpu" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/device_screen_resolution" android:key="device_screen_resolution" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/mem_info" android:key="device_memory" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="@string/swap_mem_info" android:key="device_swap_memory" android:summary="@string/device_info_default" style="?android:preferenceInformationStyle" />
<Preference android:title="Guide by" android:key="android_fire_xda" android:summary="AndroidFire" style="?android:preferenceInformationStyle" />
</PreferenceScreen>
Step 9 :- Recompile and Decompile Again
Step 10 :- Go to values/public.xml
Step 11 :- search for device_info_settings Note the id code
Step 12 :- Search for 0x7f040010 Change This according to your public
Step 13 :- Recompile And Sign And Enjoy
My Work
My Work
Android
APP
AF-Root Checker
[APP][4.1+] AF Calendar Widget
[APP][2.3+] AF CPU Widget
GUIDE
[GUIDE][2.3+] How to add AF Volume Panel to Android Phone
AF-Battery Mod
ICS PlatLogo
[GUIDE] How to Disable Scrolling Cache for Smooth
[GUIDE] How to add Extra Options in About Sections
[GUIDE] How to add Colorey Platlogo
[GUIDE] How to add Android L Preview Platlogo
[GUIDE] [TUTORIAL] [GUIDE] How to Play with Screen Title
[GUIDE]How to Replace Checkbox with Switch
ROM
[ROM] AF Firey
TOOL
[TOOL] AF-Apk​[TOOL] AF-Signer​​
Reserved
AF Work
AF Work
Android
APP
[APP][4.1+] AF Calendar Widget
[APP][2.3+] AF CPU Widget
GUIDE
[GUIDE][2.3+] How to add AF Volume Panel to Android Phone
ROM
[ROM] AF Firey
TOOL
[TOOL] AF-Apk​[TOOL] AF-Signer​​
I have an error
Hello there
At first I apologize for my English.
I tried this method but I have a problem with steps 11 and 12
can you help me?
when I do research in device_info_settings .. / values ​​/ public.xml
I find 2 id's:
Line 451: <public type="xml" name="device_info_settings" id="0x7f050011" />
Line 2469: <public type="string" name="device_info_settings" id="0x7f0b04a8" />
And I tried with the two solution, I get an error ...
And id 0x7f040010, is:
Line 261: <public type="layout" name="auto_brightness_preview" id="0x7f040010" />
thank you in advance.
daemon1666 said:
Hello there
At first I apologize for my English.
I tried this method but I have a problem with steps 11 and 12
can you help me?
when I do research in device_info_settings .. / values ​​/ public.xml
I find 2 id's:
Line 451:
Line 2469:
And I tried with the two solution, I get an error ...
And id 0x7f040010, is:
Line 261:
thank you in advance.
Click to expand...
Click to collapse
First of Thing that What Android Version r using if Your Android Version 2.3 leave step 12 and 13 if are using 3.0+ then find for that ids change valuse according to ur public device_info_settings (xml one not strings) if u get error pls show me logcat logcat will easily to understand ur problem Recommended You to use AF-Apk to Decompile and Recompile Apk If Want it search on google ok
2nd Things No Need to Say Thanks Just Presss the button
AndroidFire said:
First of You What Android Version if Your Android Version 2.3 leave step 12 and 13 if are using 2.3+ then find for that ids change valuse according to ur public device_info_settings (xml one not layout)
2nd Things No Need to Say Thanks Just Presss the button
Click to expand...
Click to collapse
I have a nexus 5
in custom rom 4.4.4
I started in xml, so I don't know by what I must change the id
can you show me an example?
Sorry but I am a beginner.
daemon1666 said:
I have a nexus 5
in custom rom 4.4.4
I started in xml, so I don't know by what I must change the id
can you show me an example?
Sorry but I am a beginner.
Click to expand...
Click to collapse
First things.
can u attach ur public.xml and DeviceInfoSettings.smali I will Do for You
Second Things Thanks Button will more appericated then saying thanks
AndroidFire said:
First things.
can u attach ur public.xml and DeviceInfoSettings.smali I will Do for You
Second Things Thanks Button will more appericated then saying thanks
Click to expand...
Click to collapse
I joined the archive.
Ihave already made steps 1-9
And
I clicked on the button "thanks" and +1 on Google+
daemon1666 said:
I joined the archive.
Ihave already made steps 1-9
And
I clicked on the button "thanks" and +1 on Google+
Click to expand...
Click to collapse
done mind don't kang my work respect my work here is the link just replace the file
https://db.tt/ieOJqB3g
Thx... Again
If something has changed, I'm sorry, I had tried so many things by myself.
What was the problem?
I just tested ..
The first compilation, I have problems compiling
having replaced the device_info_settings.smali well.
I have attached the log
deleted sorry..

[GUIDE][GB]How to add jellybean like WiFi-BT switch in title bar

Add jellybean like Wi-Fi & Bluetooth ON/OFF switch in title_bar.
This is a cool guide to add Wi-Fi or Bluetooth switch in titlebar as you can see in jellybean.
This mod work will on any gingerbread running phone.
Things you need:-
Apktool/Apk-Multitool
Notepad++
Basic knowledge about compiling & decompiling.
Basic knowledge about xml editing & modding.
Settings.apk from your rom
Click to expand...
Click to collapse
Lets start:-
Step-1
First of all decompile your settings.apk
Step-2
Now download this
and extract it.
Open & copy the "res" and paste it in your decompiled "settings" folder
Step-3
Now goto settings/res/xml and open wifi_settings.xml
Here you will see a line like that:
Code:
<CheckBoxPreference android:persistent="false" android:title="@string/wifi_quick_toggle_title" android:key="enable_wifi" android:summary="@string/wifi_quick_toggle_summary" />
Step-4
Add this android:layout="@layout/sachin_wifi_switch" Now it will look like this:
Code:
<CheckBoxPreference android:persistent="false" [COLOR="red"]android:layout="@layout/sachin_wifi_switch"[/COLOR] android:title="@string/wifi_quick_toggle_title" android:key="enable_wifi" android:summary="@string/wifi_quick_toggle_summary" />
now save and close it.
Step-5
Now open bluetooth_settings.xml
and find this:
Code:
<CheckBoxPreference android:title="@string/bluetooth" android:key="bt_checkbox" android:summary="@string/bluetooth_quick_toggle_summary" />
Step-6
Here add this android:layout="@layout/sachin_bt_switch"
and now it will look like this:
Code:
<CheckBoxPreference [COLOR="red"]android:layout="@layout/sachin_bt_switch"[/COLOR] android:title="@string/bluetooth" android:key="bt_checkbox" android:summary="@string/bluetooth_quick_toggle_summary" />
save and close it.
Step-7
Now open AndroidManifest.xml in "Settings" folder.
Here find this:
Code:
<activity android:label="@string/wifi_settings" android:icon="@drawable/mainmenu_icon_wifi_settings" android:name=".wifi.WifiSettings" android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation">
Step-8
After "activity" add this android:theme="@android:style/Theme.NoTitleBar"
like this:
Code:
<activity [COLOR="red"]android:theme="@android:style/Theme.NoTitleBar"[/COLOR] android:label="@string/wifi_settings" android:icon="@drawable/mainmenu_icon_wifi_settings" android:name=".wifi.WifiSettings" android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation">
now find this:
Code:
<activity android:label="@string/bluetooth_settings_title" android:icon="@drawable/mainmenu_icon_bluetooth_settings" android:name=".bluetooth.BluetoothSettings" android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation">
similarly do here, add android:theme="@android:style/Theme.NoTitleBar" after "activity".
like this:
Code:
<activity android:theme="@android:style/Theme.NoTitleBar" android:label="@string/bluetooth_settings_title" android:icon="@drawable/mainmenu_icon_bluetooth_settings" android:name=".bluetooth.BluetoothSettings" android:clearTaskOnLaunch="true" android:configChanges="keyboardHidden|orientation">
save and close it.
and you are done with modding.
Now compile & Sign the new Settings.apk
and push it to system/app and change the permission to rw-r-r
Enjoy! Press THANKS if you like it
HIT HARD
HIT OFTEN
#Roman Empire​
Regards:- Sachin Kumar53

Categories

Resources