If it is an activity is eaay if not is not possible
Sent from my SM-G935F using Tapatalk
If it is an activity is eaay if not is not possible
Hello. Thanks for the info. This is not an app. It's an open source code project. It cannot and will not be monetized. Ever.Hi Guys I recommend the service of appodeal to monetize your app in a atomated and very convenient way. You find the website under appodeal dot com.
They made a fantastic solution especialy friendly for developers.
chmod 0777 /cache/recovery
echo "%BACKUP_LOCATION\nbackup %BACKUP_OPTIONS %BACKUP_NAME\nwipe system\nwipe data\nwipe cache\nwipe dalvik\ncmd reboot" > /cache/recovery/openrecoveryscript
reboot recovery
Thanks.. we already know that. We've been working on something similar on what you have. We actually even passed the idea to peppe and he actually used it. Our original idea was a bit more complex, and since we never released the rom we just left it apartJust an idea
Im working on an app (made with Tasker) to install ROM/update, kernel, recovery, backup/restore ROM (in future i might add the possibility to choose custom time when to backup). Using OpenRecoveryScript, my app is able to write the OpenRecoveryScript commands based on user choices (e.g. automatically go to recovery with shell command and start to do a backup of the actual ROM, then install ROM and GAPPS and auto reboot once it is finished).
ROM Control can run scripts right? Then you might want to take a look at OpenRecoveryScript . You can make a backup menu in ROM Control to backup the ROM etc. It will be more wonderful
You can find these informations about how to use OpenRecoveryScript on xda/google, but i will tell you here too:
1) First you must set the right permission for /cache/recovery directory.
PHP:chmod 0777 /cache/recovery
2) Then write the commands you want to OpenRecoveryScript like this:
PHP:echo "%BACKUP_LOCATION\nbackup %BACKUP_OPTIONS %BACKUP_NAME\nwipe system\nwipe data\nwipe cache\nwipe dalvik\ncmd reboot" > /cache/recovery/openrecoveryscript
\n= new line (enter)
This is the code i use in Tasker.
3) Then i use a shell command to reboot to recovery:
PHP:reboot recovery
I don't think so. Show us your smali array/method.Hi,
I have a question. I have a mod for choosing gifs for animation. I use it with RC with thumnailpreference. All is working but if i select a gif after 9 means 10 or 11 it shows me always first gif. All is right in smalis and keys and arrays. I checked 1000 times. Is it possible that that preference can only choose between 9 items?
Not in RC, in systemui.
I don't think so. Show us your smali array/method.
---------- Post added at 12:12 PM ---------- Previous post was at 11:59 AM ----------
Not in RC, in systemui.
Hi,
I have a question. I have a mod for choosing gifs for animation. I use it with RC with thumnailpreference. All is working but if i select a gif after 9 means 10 or 11 it shows me always first gif. All is right in smalis and keys and arrays. I checked 1000 times. Is it possible that that preference can only choose between 9 items?
const/16 v4, [COLOR="Blue"]0x9[/COLOR]
if-eq v3, v4, :cond_9
const/16 v4, [COLOR="blue"]0xa
[/COLOR]
if-eq v3, v4, :cond_10
const/16 v4, [COLOR="blue"]0xb
[/COLOR]
if-eq v3, v4, :cond_11
const/16 v4, [COLOR="blue"]0xc[/COLOR]
if-eq v3, v4, :cond_12
const/16 v4, [COLOR="blue"]0xd
[/COLOR]
if-eq v3, v4, :cond_13
const/16 v4, [COLOR="blue"]0xe[/COLOR]
if-eq v3, v4, :cond_14
const/16 v4, [COLOR="blue"][COLOR="blue"]0xf
[/COLOR][/COLOR]
if-eq v3, v4, :cond_15
const/16 v4, [COLOR="blue"]0x10[/COLOR]
if-eq v3, v4, :cond_16
const/16 v4, [COLOR="blue"]0x11[/COLOR]
if-eq v3, v4, :cond_17
I get it. Thx. Was a thinking problem. I forgot that conds are hexadezimal so i made arraxys after 9 also to a and b.In array, the most common problem is hex doesn't go right from 9 to 10.
It goes from 9 to a, b, c, d, e, f --> then after f item it changes again.
So here is example:
You should first show the code then you can expect some suggestion. If we don't know what you did we cannot tell you what's wrong. Upload sources to git and post the linkhello @daxgirl
Its a great source..
i had a small doubt, could you please look at his bro
I had started to make a new app of navigator view
When i try to apply the Theme Dark/Light (Styles) only dialog box text and background are changing
Not with navigator view
Any suggestions please
so that i can expose my code to you bro
Thank you
You should first show the code then you can expect some suggestion. If we don't know what you did we cannot tell you what's wrong. Upload sources to git and post the link
Sent from my SM-G935F using Tapatalk
Hey,here is the app source bro
https://github.com/venkatkamesh/BarolaAeroSports
i had implemented the theme dialog and style from Rom control v1 sources
dont know what i missed
what is did is
1. added styles and drawable
added themeselection java which was woke by mainActivity
hope you brothers can help me out of this
navigationview background was same not affected by theme.. dont know why [emoji14]
Thank you again and waiting bro
Hey,
You're asking a question in general android development. The address for questions like that is Stackoverflow.
The code you linked has nothing to do with Rom control. It's your own android project. And I understand you come here looking for android developers to help you with your own code.
I am sure you will find a better suited answer on SO or if you open a question thread on xda. Here is not a proper place.
Sorry, mate.
Sent from my SM-N920C using Tapatalk
<PreferenceScreen android:title="Device info settings">
<PreferenceCategory android:title="Device info customization">
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:defaultValue="true" android:key="device_info_visibility" android:summaryOff="Disabled" android:summaryOn="Enabled" android:title="Enable device info view"/>
</PreferenceCategory>
<PreferenceCategory android:title="Text colors" android:dependency="device_info_visibility">
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:defaultValue="#ffffffff" android:key="gear_info_names_color" android:title="Info names text color"/>
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:defaultValue="#ffffffff" android:key="gear_info_values_color" android:title="Info values text color"/>
</PreferenceCategory>
<PreferenceCategory android:title="Device Info Items" android:dependency="device_info_visibility">
<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_model" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Device model"/>
<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_android_version" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Android version"/>
<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_build_version" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Build version"/>
<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_battery_level" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Battery level"/>
<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_network_name" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Network name"/>
<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_wifi_info" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="WIFI info"/>
<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_next_alarm" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Next alarm"/>
<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_up_time" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Device up time"/>
</PreferenceCategory>
</PreferenceScreen>
11-13 13:03:54.182 4922 4922 W System.err: at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.a(Unknown Source)
11-13 13:03:54.182 4922 4922 W System.err: at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.onSetInitialValue(Unknown Source)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.Preference.dispatchSetInitialValue(Preference.java:1622)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.Preference.onAttachedToHierarchy(Preference.java:1416)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:175)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:116)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:42)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.rInflate(GenericInflater.java:490)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.rInflate(GenericInflater.java:495)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.inflate(GenericInflater.java:327)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.inflate(GenericInflater.java:264)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:274)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:302)
11-13 13:03:54.182 4922 4922 W System.err: at com.wubydax.romcontrol.v2.a.onCreate(Unknown Source)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.Fragment.performCreate(Fragment.java:2242)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:947)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1163)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.BackStackRecord.run(BackStackRecord.java:793)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1552)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentController.execPendingActions(FragmentController.java:325)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.Activity.performStart(Activity.java:6914)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.access$1100(ActivityThread.java:221)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
11-13 13:03:54.182 4922 4922 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
11-13 13:03:54.182 4922 4922 W System.err: at android.os.Looper.loop(Looper.java:158)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7224)
11-13 13:03:54.182 4922 4922 W System.err: at java.lang.reflect.Method.invoke(Native Method)
11-13 13:03:54.182 4922 4922 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
11-13 13:03:54.182 4922 4922 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
11-13 13:03:54.182 4922 4922 W System.err: at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
11-13 13:03:54.182 695 2330 D SecContentProvider: query(), uri = 17 selection = isSettingsChangesAllowed
11-13 13:03:54.182 4922 4922 W System.err: java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.preference.Preference$OnPreferenceChangeListener.onPreferenceChange(android.preference.Preference, java.lang.Object)' on a null object reference
11-13 13:03:54.182 4922 4922 W System.err: at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.a(Unknown Source)
11-13 13:03:54.182 4922 4922 W System.err: at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.onSetInitialValue(Unknown Source)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.Preference.dispatchSetInitialValue(Preference.java:1622)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.Preference.onAttachedToHierarchy(Preference.java:1416)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:175)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:116)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:42)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.rInflate(GenericInflater.java:490)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.rInflate(GenericInflater.java:495)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.inflate(GenericInflater.java:327)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.inflate(GenericInflater.java:264)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:274)
11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:302)
11-13 13:03:54.182 4922 4922 W System.err: at com.wubydax.romcontrol.v2.a.onCreate(Unknown Source)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.Fragment.performCreate(Fragment.java:2242)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:947)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1163)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.BackStackRecord.run(BackStackRecord.java:793)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1552)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentController.execPendingActions(FragmentController.java:325)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.Activity.performStart(Activity.java:6914)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.access$1100(ActivityThread.java:221)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
11-13 13:03:54.182 4922 4922 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
11-13 13:03:54.182 4922 4922 W System.err: at android.os.Looper.loop(Looper.java:158)
11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7224)
11-13 13:03:54.182 4922 4922 W System.err: at java.lang.reflect.Method.invoke(Native Method)
11-13 13:03:54.182 4922 4922 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
11-13 13:03:54.182 4922 4922 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
11-13 13:03:57.317 4976 4976 D AndroidRuntime: Shutting down VM
11-13 13:03:57.322 4976 4976 E AndroidRuntime: FATAL EXCEPTION: main
11-13 13:03:57.322 4976 4976 E AndroidRuntime: Process: com.wubydax.romcontrol.v2, PID: 4976
11-13 13:03:57.322 4976 4976 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wubydax.romcontrol.v2/com.wubydax.romcontrol.v2.MainActivity}: android.view.InflateException: Binary XML file line #33: Error inflating class com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3253)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.ActivityThread.access$1100(ActivityThread.java:221)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.os.Looper.loop(Looper.java:158)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7224)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #33: Error inflating class com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:443)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.rInflate(GenericInflater.java:483)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.rInflate(GenericInflater.java:495)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.rInflate(GenericInflater.java:495)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.inflate(GenericInflater.java:327)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.inflate(GenericInflater.java:264)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:274)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:302)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at com.wubydax.romcontrol.v2.a.onCreate(Unknown Source)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.Fragment.performCreate(Fragment.java:2242)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:947)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1163)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.BackStackRecord.run(BackStackRecord.java:793)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1552)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.FragmentController.execPendingActions(FragmentController.java:325)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.Activity.performStart(Activity.java:6914)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: ... 10 more
11-13 13:03:57.322 4976 4976 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference" on path: DexPathList[[zip file "/system/priv-app/RomControl.apk"],nativeLibraryDirectories=[/system/lib/RomControl, /vendor/lib, /system/lib]]
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.createItem(GenericInflater.java:376)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:432)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: ... 26 more
11-13 13:03:57.322 4976 4976 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference" on path: DexPathList[[dex file "/data/dalvik-cache/xposed_XResourcesSuperClass.dex"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: ... 29 more
11-13 13:03:57.322 4976 4976 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.Class.classForName(Native Method)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
11-13 13:03:57.322 4976 4976 E AndroidRuntime: ... 30 more
11-13 13:03:57.322 4976 4976 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
@daxgirl
i have added this on notification_panel_prefs.xml
PHP:<PreferenceScreen android:title="Device info settings"> <PreferenceCategory android:title="Device info customization"> <com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:defaultValue="true" android:key="device_info_visibility" android:summaryOff="Disabled" android:summaryOn="Enabled" android:title="Enable device info view"/> </PreferenceCategory> <PreferenceCategory android:title="Text colors" android:dependency="device_info_visibility"> <com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:defaultValue="#ffffffff" android:key="gear_info_names_color" android:title="Info names text color"/> <com.wubydax.romcontrol.v2.prefs.ColorPickerPreference android:defaultValue="#ffffffff" android:key="gear_info_values_color" android:title="Info values text color"/> </PreferenceCategory> <PreferenceCategory android:title="Device Info Items" android:dependency="device_info_visibility"> <com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_model" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Device model"/> <com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_android_version" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Android version"/> <com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_build_version" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Build version"/> <com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_battery_level" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Battery level"/> <com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_network_name" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Network name"/> <com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_wifi_info" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="WIFI info"/> <com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_next_alarm" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Next alarm"/> <com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:defaultValue="true" android:key="device_up_time" android:summaryOff="Hidden" android:summaryOn="Shown" android:title="Device up time"/> </PreferenceCategory> </PreferenceScreen>
i got RC fc with these errors
PHP:11-13 13:03:54.182 4922 4922 W System.err: at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.a(Unknown Source) 11-13 13:03:54.182 4922 4922 W System.err: at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.onSetInitialValue(Unknown Source) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.Preference.dispatchSetInitialValue(Preference.java:1622) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.Preference.onAttachedToHierarchy(Preference.java:1416) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:175) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:116) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:42) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.rInflate(GenericInflater.java:490) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.rInflate(GenericInflater.java:495) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.inflate(GenericInflater.java:327) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.inflate(GenericInflater.java:264) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:274) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:302) 11-13 13:03:54.182 4922 4922 W System.err: at com.wubydax.romcontrol.v2.a.onCreate(Unknown Source) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.Fragment.performCreate(Fragment.java:2242) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:947) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1163) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.BackStackRecord.run(BackStackRecord.java:793) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1552) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentController.execPendingActions(FragmentController.java:325) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.Activity.performStart(Activity.java:6914) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.access$1100(ActivityThread.java:221) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 11-13 13:03:54.182 4922 4922 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 11-13 13:03:54.182 4922 4922 W System.err: at android.os.Looper.loop(Looper.java:158) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7224) 11-13 13:03:54.182 4922 4922 W System.err: at java.lang.reflect.Method.invoke(Native Method) 11-13 13:03:54.182 4922 4922 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 11-13 13:03:54.182 4922 4922 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 11-13 13:03:54.182 4922 4922 W System.err: at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102) 11-13 13:03:54.182 695 2330 D SecContentProvider: query(), uri = 17 selection = isSettingsChangesAllowed 11-13 13:03:54.182 4922 4922 W System.err: java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.preference.Preference$OnPreferenceChangeListener.onPreferenceChange(android.preference.Preference, java.lang.Object)' on a null object reference 11-13 13:03:54.182 4922 4922 W System.err: at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.a(Unknown Source) 11-13 13:03:54.182 4922 4922 W System.err: at com.wubydax.romcontrol.v2.prefs.ColorPickerPreference.onSetInitialValue(Unknown Source) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.Preference.dispatchSetInitialValue(Preference.java:1622) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.Preference.onAttachedToHierarchy(Preference.java:1416) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceGroup.addPreference(PreferenceGroup.java:175) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:116) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceGroup.addItemFromInflater(PreferenceGroup.java:42) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.rInflate(GenericInflater.java:490) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.rInflate(GenericInflater.java:495) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.inflate(GenericInflater.java:327) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.GenericInflater.inflate(GenericInflater.java:264) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:274) 11-13 13:03:54.182 4922 4922 W System.err: at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:302) 11-13 13:03:54.182 4922 4922 W System.err: at com.wubydax.romcontrol.v2.a.onCreate(Unknown Source) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.Fragment.performCreate(Fragment.java:2242) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:947) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1163) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.BackStackRecord.run(BackStackRecord.java:793) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1552) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.FragmentController.execPendingActions(FragmentController.java:325) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.Activity.performStart(Activity.java:6914) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.access$1100(ActivityThread.java:221) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 11-13 13:03:54.182 4922 4922 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 11-13 13:03:54.182 4922 4922 W System.err: at android.os.Looper.loop(Looper.java:158) 11-13 13:03:54.182 4922 4922 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7224) 11-13 13:03:54.182 4922 4922 W System.err: at java.lang.reflect.Method.invoke(Native Method) 11-13 13:03:54.182 4922 4922 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 11-13 13:03:54.182 4922 4922 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 11-13 13:03:57.317 4976 4976 D AndroidRuntime: Shutting down VM 11-13 13:03:57.322 4976 4976 E AndroidRuntime: FATAL EXCEPTION: main 11-13 13:03:57.322 4976 4976 E AndroidRuntime: Process: com.wubydax.romcontrol.v2, PID: 4976 11-13 13:03:57.322 4976 4976 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wubydax.romcontrol.v2/com.wubydax.romcontrol.v2.MainActivity}: android.view.InflateException: Binary XML file line #33: Error inflating class com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3253) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.ActivityThread.access$1100(ActivityThread.java:221) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.os.Looper.loop(Looper.java:158) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7224) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #33: Error inflating class com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:443) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.rInflate(GenericInflater.java:483) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.rInflate(GenericInflater.java:495) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.rInflate(GenericInflater.java:495) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.inflate(GenericInflater.java:327) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.inflate(GenericInflater.java:264) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:274) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:302) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at com.wubydax.romcontrol.v2.a.onCreate(Unknown Source) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.Fragment.performCreate(Fragment.java:2242) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:947) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1163) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.BackStackRecord.run(BackStackRecord.java:793) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1552) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.FragmentController.execPendingActions(FragmentController.java:325) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.Activity.performStart(Activity.java:6914) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3216) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: ... 10 more 11-13 13:03:57.322 4976 4976 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference" on path: DexPathList[[zip file "/system/priv-app/RomControl.apk"],nativeLibraryDirectories=[/system/lib/RomControl, /vendor/lib, /system/lib]] 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.createItem(GenericInflater.java:376) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:432) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: ... 26 more 11-13 13:03:57.322 4976 4976 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference" on path: DexPathList[[dex file "/data/dalvik-cache/xposed_XResourcesSuperClass.dex"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: ... 29 more 11-13 13:03:57.322 4976 4976 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.Class.classForName(Native Method) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 11-13 13:03:57.322 4976 4976 E AndroidRuntime: ... 30 more 11-13 13:03:57.322 4976 4976 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
11-23 03:33:33.053 13246-13246/com.wubydax.romcontrol.v2 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.wubydax.romcontrol.v2, PID: 13246
java.lang.ClassCastException: android.widget.FrameLayout cannot be cast to android.widget.LinearLayout
at com.wubydax.romcontrol.v2.PrefsFragment.setUpNestedPreferenceLayout(PrefsFragment.java:128)
at com.wubydax.romcontrol.v2.PrefsFragment.onPreferenceClick(PrefsFragment.java:116)
at android.preference.Preference.performClick(Preference.java:1177)
at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:289)
at android.widget.AdapterView.performItemClick(AdapterView.java:324)
at android.widget.AbsListView.performItemClick(AbsListView.java:1658)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:4135)
at android.widget.AbsListView$13.run(AbsListView.java:6326)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6640)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
<PreferenceScreen android:title="Clock settings" android:key="normal_clock">
<com.wubydax.romcontrol.v2.prefs.MyListPreference android:entries="@array/clock_ampm_style" android:title="AM/PM style" android:key="ampm" android:entryValues="@array/lclock_ampm_style" />
<com.wubydax.romcontrol.v2.prefs.MyListPreference android:entries="@array/clock_day_style" android:title="Date style" android:key="day" android:entryValues="@array/lclock_day_style" />
<com.wubydax.romcontrol.v2.prefs.MyListPreference android:entries="@array/date_format" android:title="Date format" android:key="date_format" android:entryValues="@array/ldate_format" />
</PreferenceScreen>
5. You're under no obligation to thank us, credit us or tag us in your official postings while distributing your copy.You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
<resources>
[COLOR="Green"][B][I]<!--The following array is for icons you want to use for your items
You can create new icons bu right clicking the drawable folder and choosing
New vector drawable
You have a great selection of items in xml vector format.
Those are supported starting lollipop.
YOU SHOULD NOT USE PNG. not even material one. Vectors will work best with any device density.
Once you have created the vector, reference it as regular drawable in the array below.
MAKE SURE THE ITEMS IN ALL 3 ARRAYS CORRESPOND IN ORDER AND ALL 3 ARRAYS ARE SAME LENGTH-->[/I][/B][/COLOR]
<array name="nav_menu_prefs_drawables">
<item>@drawable/ic_system_ui</item>
<item>@drawable/ic_phone</item>
<item>@drawable/ic_framework</item>
<item>@drawable/ic_notification_panel</item>
</array>
[COLOR="green"][B][I]<!--This array is for your items titles.
Use @string reference, so later on your app can be translated with ease
KEEP THE ORDER BETWEEN ALL YOUR ARRAYS-->[/I][/B][/COLOR]
<string-array name="nav_menu_prefs_titles">
<item>@string/systemui_prefs</item>
<item>@string/phone_prefs</item>
<item>@string/framework_prefs</item>
<item>@string/notification_panel_prefs</item>
</string-array>
[COLOR="green"][B][I] <!--This array is the most valuable one
Here you put the file names of the preference files you create in your xml directory
THEY MUST BE PRECISE AND CASE SENSITIVE!!! DO NOT ADD .xml SUFFIX-->[/I][/B][/COLOR]
<string-array name="nav_menu_xml_file_names" translatable="false">
<item>ui_prefs</item>
<item>phone_prefs</item>
<item>framework_prefs</item>
<item>notification_panel_prefs</item>
</string-array>
</resources>
[COLOR="Teal"][B] <!--Following category shows variety of two state preferences-->[/B][/COLOR]
<PreferenceCategory
android:title="Two stated preferences test category">
[COLOR="DarkGreen"][B] <!--Normal Switch preference-->[/B][/COLOR]
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference
android:defaultValue="true"
android:key="normal_test_switch"
android:summaryOff="Disabled"
android:summaryOn="Enabled"
android:title="Normal test switch"/>
<!--Switch preference which will throw a dialog that app reboot is required-->
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference
android:defaultValue="true"
android:key="kill_app_with_dialog_test_switch"
android:summaryOff="Disabled"
android:summaryOn="Enabled"
android:title="Kill app with dialog switch"
app:isSilent="false"
app:packageNameToKill="com.android.systemui"/>
[COLOR="darkgreen"][B] <!--Switch preference which will in ADDITION to actual work, also silently restart app with given package-->
<!--Note, that isSilent attribute is by default TRUE. So you don't need to specify it if you want silent app restart-->[/B][/COLOR]
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference
android:defaultValue="true"
android:key="kill_app_silently_test_switch"
android:summaryOff="Disabled"
android:summaryOn="Enabled"
android:title="Kill app silently test switch"
app:packageNameToKill="com.android.contacts"/>
[COLOR="darkgreen"][B] <!--Switch preference which will throw a dialog that following it's action device reboot is required-->
<!--Please note, even if you specify the need to kill app, once the rebootDevice attribute is TRUE, kill app attributes are ignored-->[/B][/COLOR]
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference
android:defaultValue="true"
android:key="reboot_required_test_switch"
android:summaryOff="Disabled"
android:summaryOn="Enabled"
android:title="Switch reminding of need to reboot"
app:rebootDevice="true"/>
[COLOR="darkgreen"][B]<!--We can use kill app on checkboxes as well. Same goes for rebootDevice-->[/B][/COLOR]
<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference
android:defaultValue="true"
android:key="test_checkbox_with_kill_app"
android:summaryOff="Disabled"
android:summaryOn="Enabled"
android:title="Kill app checkbox"
app:isSilent="false"
app:packageNameToKill="com.android.systemui"/>
</PreferenceCategory>
<PreferenceCategory
android:title="File preferences">
[COLOR="darkgreen"][B]<!--File preference is a very special kind of preference, which works like switch but has different output.
Normal switch preference, like any two state preference, write boolean true/false into preferences.
In our app it also writes 1/0 into database.
File preference doesn't write into database. If it is switched on, it creates a file in our app directory in data.
That name of that file is what you set as key.
This is widely used by [user=1042140]@tdunham[/user] for global boolean needs in systemui.
Please refer to his guide about setting global boolean to see appropriate smali application for this preference.
This is most useful for mods in smali files where you do not have context access to get content resolver.
Because File class is native java class and checking for it's existence does not require android context.
File preferences can have attribute to kill app or reboot device.-->[/B][/COLOR]
[COLOR="darkgreen"][B] <!--This is a simple file preference. Note that once it's switched on, a file with the name identical to key is created in
/data/data/com.wubydax.romcontro.v2l/files
When it's switched off the file is deleted.-->[/B][/COLOR]
<com.wubydax.romcontrol.v2.prefs.FilePreference
android:key="new_file"
android:summaryOff="Disabled"
android:summaryOn="Enabled"
android:title="New file preference"/>
[COLOR="darkgreen"][B] <!--This file preferences upon change will prompt to kill app-->[/B][/COLOR]
<com.wubydax.romcontrol.v2.prefs.FilePreference
android:key="another_file"
android:summaryOff="Disabled"
android:summaryOn="Enabled"
android:title="Kill app file preference"
app:isSilent="false"
app:packageNameToKill="com.android.systemui"/>
</PreferenceCategory>
[COLOR="Teal"]<!--The following category demonstrates various ways of using ColorPickerPreference-->[/COLOR]
<PreferenceCategory
android:title="Color pickers test category">
[COLOR="DarkGreen"][B]<!--Normal color picker preference-->
<!--Please note, the [COLOR="Red"][U]hexValue and the alpha are there by default now[/U][/COLOR]. If you want to cancel them, you need to specify false-->[/B][/COLOR]
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference
android:defaultValue="#ffccdd"
android:key="test_color_preference"
android:title="Normal test color picker"/>
[COLOR="DarkGreen"][B]<!--Color picker preference without the alpha slider and without the hex value
You can set false to both or one of them-->[/B][/COLOR]
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference
alphaSlider="false"
hexValue="false"
android:defaultValue="#ffffff"
android:key="no_alpha_color_key"
android:title="Color picker with no alpha or hex"/>
[COLOR="darkgreen"][B]<!--Color picker preference with kill app option
Note, [U]you can also use rebootDevice attribute[/U], like with two stated preferences-->[/B][/COLOR]
<com.wubydax.romcontrol.v2.prefs.ColorPickerPreference
android:key="app_kill_color_key"
android:title="Color picker with app kill"
app:isSilent="false"
app:packageNameToKill="com.android.systemui"/>
</PreferenceCategory>
[COLOR="DarkGreen"][I]<!--Example of simple list preference with radio button items
You absolutely HAVE to set dafaultValue and it has to be one of your entryValues string arrays
You can use any of the following with kill app attributes or rebootDevice attribute
Note, that you can now use dependency on list preference.
Custom attribute app:dependentValue will allow you to decide which list item, if selected,
will set dependent preferences disabled.-->[/I][/COLOR]
<com.wubydax.romcontrol.v2.prefs.MyListPreference
android:defaultValue="20"
android:entries="@array/test_list_entries"
android:entryValues="@array/test_list_values"
android:key="test_list_key"
app:dependentValue="1"
android:title="Choose items from the list preference"/>
[COLOR="darkgreen"][I] <!--Thumbnail list preference is a special kind of preference which allows you to show preview of the selected image
This can be useful f.e. for setting custom bg to toggles in systemui
Needless to say you need to put the same images you put in systemui in Rom Control in drawables
And you need to create 3 kinds of arrays in arrays.xml file. 2 string arrays for entryList and entryValuesList and one simple array
for drawable references. You can see the arrays for the following preferences inside arrays.xml
You have to set default and the default has to be one of entryValuesList strings-->
<!--Example of simple Thumbnail preference with no additional attributes-->[/I][/COLOR]
<com.wubydax.romcontrol.v2.prefs.ThumbnailListPreference
android:defaultValue="1"
android:key="test_thumbnail_key"
android:title="Simple thumbnail preference"
app:drawableArray="@array/thumbnail_drawables"
app:entryList="@array/thumbnail_items"
app:entryValuesList="@array/thumbnail_values"
app:dependentValue="2"/>
[COLOR="darkgreen"][I]<!--Example of Thumbnail preference which calls to kill app upon selected item-->[/I][/COLOR]
<com.wubydax.romcontrol.v2.prefs.ThumbnailListPreference
android:defaultValue="2"
android:key="test_thumbnail_kill_app"
android:title="Kill app thumbnail preference"
android:dependency="test_thumbnail_key"
app:drawableArray="@array/thumbnail_drawables"
app:entryList="@array/thumbnail_items"
app:entryValuesList="@array/thumbnail_values"
app:isSilent="false"
app:packageNameToKill="com.android.systemui"/>
[COLOR="DarkGreen"][I]<!--The following preference is a special preference that's called IntentDialogPreference
This preference allows you to choose an app from the list. it also conveniently includes search field
This preference writes into database what's called component name for specific system needs.
When we want to call an app in android, we need to provide some information as to which app we want to launch
and which activity inside that app we want to lunch.
Launching app by combination of those is called explicit intent. Explicit intent needs 2 things to run an app:
1. Package name
2. Activity or service name
This preference is most useful for launching an specific app based on info you can fetch from database
For example on double click on home key
Intent dialog preference puts the info for explicit intent in a string. First package name, then separator, then activity name
You can use any separator you want. The default separator is "##"
But as you can see in following example we set the separator to be forward slash "/"
The separator depends on how you build the mod in smali for your needs.
Any kill app or reboot device attributes are applicable here as well-->
[/I][/COLOR]
[COLOR="darkgreen"][I]<!--This specific IntentDialogPreference has defaultValue set to Settings app.
You DO NOT need to set default. Only if you want to. But it is in most cases not necessary and even not that good.
This is just an example. When you run this, you will see that the preference has an icon of the chosen app on the right
and a name of the app set as summary. When you choose a new app, those things change-->[/I][/COLOR]
<com.wubydax.romcontrol.v2.prefs.IntentDialogPreference
android:defaultValue="com.android.settings/com.android.settings.Settings"
android:key="test_intent_with default"
android:title="Select Test App with default"
app:intentSeparator="/"/>
[COLOR="darkgreen"][I]<!--This IntentDialogPreference comes with no default and no separator. So default separator will be applied "##"
and it also has no search showing-->[/I][/COLOR]
<com.wubydax.romcontrol.v2.prefs.IntentDialogPreference
android:key="test_intent_without default"
android:title="Select app, no default, no search, ## separator"
app:showSearch="false"/>
[COLOR="darkgreen"][I]<!--This preference will prompt to reboot device upon selection
This is useful if f.e. you use it to set default app to open when home button is double clicked
Reboot is advised but not necessary immediately. So user will be shown a dialog to let them know they need to reboot
And they can reboot immediately or later-->[/I][/COLOR]
<com.wubydax.romcontrol.v2.prefs.IntentDialogPreference
android:key="test_intent_without_default"
android:title="Select app and reboot device"
app:intentSeparator="/"
app:rebootDevice="true"
app:showSearch="true"/>
[COLOR="DarkGreen"][I][B] <!--Edit text preference is a dialog preference that allows you to enter custom text-->[/B][/I][/COLOR]
<com.wubydax.romcontrol.v2.prefs.MyEditTextPreference
android:defaultValue="test"
android:key="test_edit_text_key"
android:title="Input custom text"/>
[COLOR="darkgreen"][B][I]<!--The following category shows usage of special preference we use to open an app based on component info
All you need to provide for this preference is package name and activity name separated by forward slash "/" like shown below
We will split the component info into components and check if the app is installed
if it's installed, we will show the app icon as preference icon and app name as title
If the app is not installed the preference is automatically removed from the list.
You can set your own summary to explain about the app.
If you wish to show a custom icon for that app shortcut or have custom title,
if you wish to use custom icon or custom title, like you would do normally with preference,
You are free to use android:title and android:icon attributes.
Our class will then use the items you chose instead of the application title and icon.
This WILL NOT affect the intent for opening application. It's a cosmetic measure for your convenience.-->[/I][/B][/COLOR]
<PreferenceCategory
android:title="Shortcut to apps preferences">
[COLOR="darkgreen"][B][I] <!--Example of simple app shortcuts. If those apps are not installed, the preferences will not show-->
[/I][/B][/COLOR] <com.wubydax.romcontrol.v2.prefs.OpenAppPreference
android:summary="Application to browse your files, including root files"
app:componentName="com.speedsoftware.rootexplorer/com.speedsoftware.rootexplorer.RootExplorer"/>
<com.wubydax.romcontrol.v2.prefs.OpenAppPreference
android:summary="Control samsung's toolbox, turn it on or off, choose available apps and rearrange them"
app:componentName="com.wubydax.toolboxsettings/com.wubydax.toolboxsettings.ToolboxSettings"/>
[COLOR="darkgreen"][B][I] <!--Example of OpenAppPreference with custom title and icon-->
[/I][/B][/COLOR] <com.wubydax.romcontrol.v2.prefs.OpenAppPreference
android:summary="Choose what app or shortcut to open when TW launcher is being swiped to the magazine page"
android:title="Shortcut to GearTWSwipe"
android:icon="@mipmap/ic_launcher"
app:componentName="com.wubydax.geartwswipe/com.wubydax.geartwswipe.ResetDialogActivity"/>
[COLOR="darkgreen"][B][I] <!--Open app preference with only cuctom title and the icon which is loaded from the app-->
[/I][/B][/COLOR] <com.wubydax.romcontrol.v2.prefs.OpenAppPreference
app:componentName="eu.chainfire.supersu/eu.chainfire.supersu.MainActivity-Material"
android:title="Chainfire's SuperSu App"
android:summary="Manage root permissions for apps and services"/>
</PreferenceCategory>
<PreferenceCategory
android:title="Select image preferences">
[COLOR="darkgreen"][B][I]<!--Select image preferences allow the user to select any image from the gallery.
The uri for that image will be written into the database
Android can fetch images based on their uri (universal resource identifier).
A type of uri that you all know is called URL, which is a web address.
Uri for database is the "address" of an item inside the database.
In android we have Media database, which hosts info about media items. In our case we are interested in images.
Upon clicking this preference a Gallery will launch, upon selecting image, it's uri will be written into database.
In your mods you can fetch the string, convert it to Uri and set that image as background to anything you want.
We use this method for setting custom image in our mod for background to notification panel-->[/I][/B][/COLOR]
<!--Those are examples of simple uri selection preference. The icon for them will be the selected image preview
You need to set title and key. That's it.-->
<com.wubydax.romcontrol.v2.prefs.UriSelectionPreference
android:key="test_image_selection_key_2"
android:title="Select Image 2"/>
</PreferenceCategory>
[COLOR="darkgreen"][I][B]<!--Running scripts in rom modding is no silly business.
We need shell scripts for purposes that can vary from writing a line into a file on sd,
through replacing sound files and host files,
to as far as replacing entire apk and jar files.
Because shell scripts can vary in their complexity, we created a special preference that runs shell scripts.
The major component in this preference is the scriptName attribute. The script name should be given in full,
as string, including extension (.sh).
The code for the preference knows where your scripts are found. It will locate the script if it's found there
and execute it.
if script execution fails, a number is being shown. That means the exit code of a script is not 0.
That means something is wrong in the script.
If the script is executed properly, a toast will be shown saying "Executed successfully"-->[/B][/I][/COLOR]
<PreferenceCategory
android:title="Run script preferences">
[COLOR="darkgreen"][B][I]<!--This is the basic script preference. It will jujst run a script.-->[/I][/B][/COLOR]
<com.wubydax.romcontrol.v2.prefs.RunScriptPreference
android:title="Execute script with prompt"
app:scriptFileName="simple_test.sh"
android:summary="This action will throw warning dialog before executing script"/>
[COLOR="darkgreen"][I][B]<!--Because of the radical nature of running shall scripts with su,
We included a dialog which is shown when a user clicks on script preference
By default confirm dialog will be shown before executing eny script. If you wish to run a script without the warning dialog,
You need to specify the custom attribute that a dialog should not be shown.
We strongly encourage you to keep the dialog. It's better for your users to be sure they clicked on the right option-->[/B][/I][/COLOR]
<com.wubydax.romcontrol.v2.prefs.RunScriptPreference
android:title="Execute without prompt"
app:scriptFileName="simple_test.sh"
app:showConfirmDialog="false"
android:summary="This action will execute script without warning"/>
[COLOR="darkgreen"][I][B]<!--Script preference with optional reboot-->[/B][/I][/COLOR]
<com.wubydax.romcontrol.v2.prefs.RunScriptPreference
android:title="Script with optional reboot"
app:rebootOptions="optional"
app:scriptFileName="simple_test.sh"
android:summary="This action will write into a file on sd card and show dialog that reminds the user to reboot their phone at this time or later for the action to take effect"/>
[COLOR="darkgreen"][I]<!--Script preference with imminent reboot-->[/I][/COLOR]
<com.wubydax.romcontrol.v2.prefs.RunScriptPreference
android:title="Script with imminent reboot"
android:summary="This action will run script which has reboot command at the end and warn user that reboot of device will follow the script execution immediately"
app:rebootOptions="imminent"
app:scriptFileName="simple_test.sh"/>
[COLOR="DarkGreen"][B][I] <!--We were asked by some developers to make a kill app option available for script preference
Therefore, you can also use the kill package attributes now, silent or with dialog,
for your script preferences.
The following RunScriptPreference will prompt killing contacts app f.e
P.s. you can set icons to your run script preferences like any other preference-->[/I][/B][/COLOR]
<com.wubydax.romcontrol.v2.prefs.RunScriptPreference
android:title="Execute and kill app + icon"
android:icon="@mipmap/ic_launcher"
android:summary="Upon finishing, this script preference will prompt a user to kill app, since we set the isSilent attribute to false"
app:packageNameToKill="com.android.contacts"
app:isSilent="false"
app:scriptFileName="simple_test.sh"/>
</PreferenceCategory>
[COLOR="DarkGreen"][I]<!--This is one of those little bonus thingies what we made for our beta-testers
and you all get to inherit it. It's a little preference class called ImageHeaderPreference
It allows you to choose and image as header for your preference screen.
Just to bring a little color and life into all those switches and checkboxes...-->[/I][/COLOR]
<com.wubydax.romcontrol.v2.prefs.ImageHeaderPreference
app:imageSource="@drawable/android"/>