Feature:
- PreferenceScreen
- SeekBarPreference
- ColorPickerPreference
- MyListPreference
- SwitchPreference
- CheckBoxPreference
- MyEditTextPreference
- FilePreference
- and many more..
Caranya:
1. Download bahannya disini:
https://drive.google.com/open?id=0ByJzmx4k7dMYRHZZOC1uWE5mNk0
2. Decompile Settings.apk
3. Copy folder smali dari guide
4. Copy folder res ke folder res ente
5. Buka AndroidManifest.xml.
Cari
<uses-permission android:name="android.permission.REBOOT"/>, tambahkan dibawahnya:
<uses-permission android:name="android.permission.FORCE_STOP_PACKAGES" />
Scroll ke line paling bawah.. tambahkan ini diatas </application>
<activity android:label="@string/zen_control_title" android:name="com.android.settings.bamzzz.ZenControl" />
6. Buka res/xml/dashboard_categories.xml (Lollipop) atau res/xml/settings_headers.xml (JB)
Tambahkan ini dibawah "<dashboard-category android:id="@id/system_section" ..." atau dimanapun ente suka
<dashboard-tile android:icon="@drawable/ic_settings_zencontrol" android:id="@id/zen_control" android:title="@string/zen_control_title" android:fragment="com.android.settings.bamzzz.ZenControl" />
7. Buka res/values/attrs.xml dan tambahkan:
<attr name="colorPrimary" format="color" />
<attr name="colorPrimaryDark" format="color" />
<attr name="colorAccent" format="color" />
<declare-styleable name="ThumbnailListPreference">
<attr name="drawableArray" format="reference" />
<attr name="entryList" format="reference" />
<attr name="entryValuesList" format="reference" />
<attr name="entryDefault" format="string" />
</declare-styleable>
8. Buka res/values/colors.xml dan tambahkan:
<color name="colorAccent">#ffff4081</color>
<color name="colorPrimary">#ff3f51b5</color>
<color name="colorPrimaryDark">#ff303f9f</color>
9. Buka res/values/dimens.xml dan tambahkan:
<dimen name="button_size">30.0dip</dimen>
10. Buka res/values/ids.xml dan tambahkan:
<item type="id" name="zen_control">false</item>
<item type="id" name="appIcon">false</item>
<item type="id" name="linearLayout">false</item>
<item type="id" name="appName">false</item>
<item type="id" name="appPackage">false</item>
<item type="id" name="imageView">false</item>
<item type="id" name="color_picker_view">false</item>
<item type="id" name="text_hex_wrapper">false</item>
<item type="id" name="hex_val">false</item>
<item type="id" name="old_color_panel">false</item>
<item type="id" name="new_color_panel">false</item>
<item type="id" name="fileSwitch">false</item>
<item type="id" name="searchApp">false</item>
<item type="id" name="appsList">false</item>
<item type="id" name="progressBar">false</item>
<item type="id" name="iconForApp">false</item>
<item type="id" name="seekBarPrefUnitsRight">false</item>
<item type="id" name="seekBarPrefValue">false</item>
<item type="id" name="seekBarPrefUnitsLeft">false</item>
<item type="id" name="seekBarPrefBarContainer">false</item>
<item type="id" name="seekBarPrefSeekBar">false</item>
<item type="id" name="thumbnailRadioButton">false</item>
<item type="id" name="thumbnailImage">false</item>
<item type="id" name="thumbnailText">false</item>
<item type="id" name="thumbnailListView">false</item>
<item type="id" name="thumbnailIcon">false</item>
11. Buka res/values/strings.xml dan tambahkan:
<string name="zen_control_title">Zen Control™</string>
<string name="ok">OK</string>
<string name="app_reboot_required_title">App Reboot Required</string>
<string name="app_reboot_required_message">%1$s reboot is required for the changes to take effect.\n\nReboot now?</string>
<string name="dialog_color_picker">Color Picker</string>
<string name="press_color_to_apply">Press on Color to apply</string>
12. Buka smali/com/android/settings/bamzzz/prefs/ColorPickerPreference.smali
Cari 0x1020018 #type="id" name="widget_frame"
Cocokkan dengan public id ente yg di framework-res
13. Buka smali/com/android/settings/bamzzz/prefs/FilePreference.smali
Cari 0x1020010 #type="id" name="summary"
Cocokkan dengan public id ente yg di framework-res
14. Tinggal edit res/xml/zen_control.xml untuk menambahkan preference baru,
gk perlu edit smali. Tinggal ikutin contohnya aja.
15. Selesai.
NB: Dilarang merubah nama smali dan struktur folder nya tanpa seizin dari ane..!!!
Sekian. Wassalam.
Keep oprek. Salam bootloop.
WORK JB 4.1.2 ++
XDA Thread: Here
Created by bamzzz@xda
fb.me/bamz4ever
ZenControl by Wuby986@xda & daxgirl@xda
Silahkan tinggalkan komentar EmoticonEmoticon