In this guide , I will tell "How to add Colorpicker" in Settings. :)
Tested this on 4.2 and 4.4
Tested this on 4.2 and 4.4
REQUIREMENTS :
1. Brain
2. Apktool
3. Notepad ++
4. Knowledge on How to Decompile/Recompile the apk
Lets start ,
1. Decompile your Settings.apk and merge the file (given below).
2. Now open strings.xml and add these lines above </resources>.
PHP Code:
<string name="dialog_color_picker">Color Picker</string>
<string name="press_color_to_apply">Press on color below to apply</string>
<string name="arrow_right">→</string>
<string name="arrow_down">↓</string>
<string name="hex">Hex:</string>
<string name="hex_hint">\#ff000000</string>
<string name="set">Set</string>
3. Now open ids.xml and add these lines above </resources>.
PHP Code:
<item type="id" name="hex">false</item>
<item type="id" name="enter">false</item>
<item type="id" name="white_panel">false</item>
<item type="id" name="black_panel">false</item>
<item type="id" name="cyan_panel">false</item>
<item type="id" name="red_panel">false</item>
<item type="id" name="green_panel">false</item>
<item type="id" name="yellow_panel">false</item>
<item type="id" name="old_color_panel">false</item>
<item type="id" name="new_color_panel">false</item>
<item type="id" name="reset">false</item>
<item type="id" name="color_picker_view">false</item>
<item type="id" name="ics_color">false</item>
<item type="id" name="color_panel_view">false</item>
4. Now Recompile your Settings.apk , Sign it and then again Decompile it.
5. Now go to smali/net/margaritov/preference/colorpicker and open the "ColorPickerDialog.smali". Then replace the id with the id present in public.xml of your Settings.apk
Important Information :
If you are having colorpicker , but its having old ui and want to use this then first follow the guide and then go to that option layout xml and change the path of the colorpicker to the line given below.
PHP Code:
net.margaritov.preference.colorpicker.ColorPickerPreference
Special Thanks To :
1. Cyanogenmod
2. XDA
Aucun commentaire:
Enregistrer un commentaire