Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to set xmlns path in PreferenceScreen - modified ListPreferenceMultiSelect
    text
    copied!<p>I have the code downloaded from site: <a href="http://blog.350nice.com/wp/archives/240" rel="nofollow noreferrer">http://blog.350nice.com/wp/archives/240</a></p> <p>But on the line:</p> <pre><code>&lt;com.threefiftynice.android.preference.ListPreferenceMultiSelect </code></pre> <p>Is error code: </p> <pre><code>Multiple annotations found at this line: - error: No resource identifier found for attribute 'checkAll' in package 'com.threefiftynice.android' - error: No resource identifier found for attribute 'separator' in package 'com.threefiftynice.android' </code></pre> <p>This is XML with error:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;PreferenceScreen android:key="prefKey" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:threefiftyprefs="http://schemas.android.com/apk/res/com.threefiftynice.android"&gt; &lt;com.threefiftynice.android.preference.ListPreferenceMultiSelect threefiftyprefs:checkAll="check" threefiftyprefs:separator="|" android:defaultValue="#ALL#" android:key="key" android:title="Image folders to monitor" android:dialogTitle="Image folders to monitor" android:summary="Specify which folders should be monitored for images" android:entries="@array/typeOfPoints" android:entryValues="@array/typeOfPointsID"/&gt; &lt;/PreferenceScreen&gt; </code></pre> <p>I know xmlns and the path to ListPreferenceMultiselect ist bad - but I tried a lot of possible paths and problem was with all of them (this is the original path from the site with original packages). This is my structure of the code</p> <p>: <img src="https://i.stack.imgur.com/n7fiXl.png" alt="enter image description here"></p> <p>How should I set the path to make it work? Thank you very much.</p> <p><strong>EDIT:</strong> After chanded it to <code>xmlns:threefiftyprefs="schemas.android.com/apk/res-auto"</code> it does not write error in xml but it throws error on run:</p> <blockquote> <p>Uncaught handler: thread main exiting due to uncaught exception<br> java.lang.RuntimeException: Unable to start activity ComponentInfo{goandknow.proximityalerts/goandknow.proximityalerts.EditPreferences}: android.view.InflateException: Binary XML file line #24: Error inflating class com.threefiftynice.android.preference.ListPreferenceMultiSelect at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284) at android.app.ActivityThread.access$1800(ActivityThread.java:112)<br> at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)<br> at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3948) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class com.threefiftynice.android.preference.ListPreferenceMultiSelect at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:441) at android.preference.GenericInflater.rInflate(GenericInflater.java:481) at android.preference.GenericInflater.rInflate(GenericInflater.java:493) at android.preference.GenericInflater.inflate(GenericInflater.java:326)<br> at android.preference.GenericInflater.inflate(GenericInflater.java:263)<br> at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:250) at android.preference.PreferenceActivity.addPreferencesFromResource(PreferenceActivity.java:253) at goandknow.proximityalerts.EditPreferences.onCreate(EditPreferences.java:24) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231) ... 11 more</p> </blockquote> <p>This is line 24:</p> <blockquote> <p>com.threefiftynice.android.preference.ListPreferenceMultiSelect</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload