Hello guys
i just want to share a very small tut
the basic part .... this should help most of new guys
The topic is about settings preferences
look at this pic
first i will explain in easy words
1. Decompile your deodexed sstock settings.apk
2. Download this Attachment 3829096 and merge to your settings
This zip contain preference smali and preference xml
Compile and Decompile
so you will get pubilc id and replace with yours in krypton.smali
If you need in Dashboard list Follow point 3
3. Now Open res/xml/dashboard_categories.xml
in that add this line (as you like to be )
as i need it in category of personal as in pic
after this line
i just added this line
where ever you add the line it should be before this line
If you need in Some subsettings like adding in display settings. follow point 4
4. For Example If you want the kryton settings inside a display settings
then open res/xml/display_settings.xml
Before
Add this line
5. so If you want to add logo to your preferences just add this
and then add a 72x72 img to drawables with the name ic_settings_kamesh.png ( as you defined )
so code look like
If Dashboard
If Subsettings
6. when we do here adding these lines we define Fragment path ( call smali at where we define the xml path to execute )
com.android.settings.rz.krypton = smali/com/android/settings/rz/krypton.smali
If you are Done with this
You are almost ready to create your own preference layouts in sub settings or on Dashboard
you can change the PATH / NAME ( but also need to change in smali ) use notepad++
What we can do with the Preference layouts ?
was Explained in next post
I am not a tutor
i just try to explain in simple that everyone can understand
i just want to share a very small tut
the basic part .... this should help most of new guys
The topic is about settings preferences
look at this pic
first i will explain in easy words
1. Decompile your deodexed sstock settings.apk
2. Download this Attachment 3829096 and merge to your settings
This zip contain preference smali and preference xml
Compile and Decompile
so you will get pubilc id and replace with yours in krypton.smali
Code:
0x7f060072 = <public type="xml" name="krypton_settings" id="0x7f060072" />
3. Now Open res/xml/dashboard_categories.xml
in that add this line (as you like to be )
as i need it in category of personal as in pic
after this line
Code:
<dashboard-category android:id="@id/system_section" android:title="@string/header_category_system">
Code:
<dashboard-tile android:id="@+id/system_section" android:title="Krypton Settings" android:fragment="com.android.settings.rz.krypton" />
Code:
</dashboard-category>
4. For Example If you want the kryton settings inside a display settings
then open res/xml/display_settings.xml
Before
Code:
</PreferenceScreen>
Code:
<PreferenceScreen android:title="Krypton Settings" android:key="krypton" android:fragment="com.android.settings.rz.krypton" />
Code:
android:icon="@drawable/ic_settings_kamesh"
so code look like
If Dashboard
Code:
<dashboard-tile android:icon="@drawable/ic_settings_kamesh" android:id="@+id/system_section" android:title="@string/RockZ1k_settings" android:fragment="com.android.settings.rz.krypton"/>
Code:
<PreferenceScreen android:icon="@drawable/ic_settings_kamesh" android:title="Krypton Settings" android:fragment="com.android.settings.rz.krypton" />
Code:
android:fragment="com.android.settings.rz.krypton"
If you are Done with this
You are almost ready to create your own preference layouts in sub settings or on Dashboard
you can change the PATH / NAME ( but also need to change in smali ) use notepad++
What we can do with the Preference layouts ?
was Explained in next post
I am not a tutor
i just try to explain in simple that everyone can understand
from xda-developers http://ift.tt/2aGaOm4
via IFTTT
No comments:
Post a Comment