<DialogPreference /> not working in 1.6 ?

by elpix1 » Fri, 18 Sep 2009 22:15:11 GMT


Sponsored Links
 Hi

I am testing my application with new SDK 1.6 and encountered a
problem
running it with the new emulator. The problem occurred when inflating
the
resources used by my Settings screen which uses a <DialogPreference />
for an About dialog:

...
...
at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  898):        at java.lang.reflect.Method.invoke
(Method.java:521)
E/AndroidRuntime(  898):        at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime(  898):        at com.android.internal.os.ZygoteInit.main
(ZygoteInit.java:549)
E/AndroidRuntime(  898):        at dalvik.system.NativeStart.main(Native
Method)
E/AndroidRuntime(  898): Caused by: android.view.InflateException:
Binary XML file line #30: Error inflating class
java.lang.reflect.Constructor
E/AndroidRuntime(  898):        at
android.preference.GenericInflater.createItem(GenericInflater.java:
397)
E/AndroidRuntime(  898):        at
android.preference.GenericInflater.onCreateItem(GenericInflater.java:
417)
E/AndroidRuntime(  898):        at
android.preference.GenericInflater.createItemFromTag
(GenericInflater.java:428)
E/AndroidRuntime(  898):        at
android.preference.GenericInflater.rInflate(GenericInflater.java:481)
E/AndroidRuntime(  898):        at
android.preference.GenericInflater.rInflate(GenericInflater.java:493)
...
...


line #30  corresponds to the following in my
"res/xml/preferences.xml"  file:

-----------------------------------------------------------------------------------------------
       ...
       ...
       <PreferenceCategory
               android:title="@string/pref_info">

30- ->    <DialogPreference
                  android:key="info_about"
                  android:title="@string/pref_info_about"
                  android:summary="@string/pref_info_about_summary"
                  android:dialogTitle="@string/pref_info_about"
                  android:dialogMessage="@string/pref_info_about_msg"
                  android:negativeButtonText="@null"
             />
        ...
        ...
-----------------------------------------------------------------------------------------------


I tried eliminating the attributes to see which one was causing the
problem
but I couldn't eliminate the problem until I removed the complete
<DialogPreference ... /> tag.


Any suggestions ?

Regards.



--~--~---------~--~----~------------~-------~--~----~



<DialogPreference /> not working in 1.6 ?

by elpix1 » Fri, 18 Sep 2009 23:42:23 GMT


 Hi,

I noticed also that in the 1.6. emulator if I try to execute (tested
in Linux and Windows):

   Settings --> Wireless controls --> Bluetooth Settings

A similar error occurs:

--------------------------------------------
Caused by: android.view.InflateException: Binary XML file line #26:
Error inflating class java.lang.reflect.Constructor
E/AndroidRuntime(  894):        at
android.preference.GenericInflater.createItem(GenericInflater.java:
397)
E/AndroidRuntime(  894):        at
android.preference.GenericInflater.createItemFromTag
(GenericInflater.java:430)
E/AndroidRuntime(  894):        at
android.preference.GenericInflater.rInflate(GenericInflater.java:481)
E/AndroidRuntime(  894):        at android.preference.GenericInflater.inflate
(GenericInflater.java:326)
E/AndroidRuntime(  894):        at android.preference.GenericInflater.inflate
(GenericInflater.java:263)
E/AndroidRuntime(  894):        at
android.preference.PreferenceManager.inflateFromResource
(PreferenceManager.java:250)
E/AndroidRuntime(  894):        at
android.preference.PreferenceActivity.addPreferencesFromResource
(PreferenceActivity.java:253)
E/AndroidRuntime(  894):        at
com.android.settings.bluetooth.BluetoothSettings.onCreate
(BluetoothSettings.java:87)
--------------------------------------------

Have anyone noticed this ?



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


<DialogPreference /> not working in 1.6 ?

by Max_well » Tue, 22 Sep 2009 03:57:39 GMT


 Same things here.

A bug have been open :  http://code.google.com/p/android/issues/detail?id=3972 


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Our app force closes on 1.6, Is SDK or image available yet?

We have had a couple users on the myTouch phone have issues in our
application. It apparently is force closing on them. I am not sure of
why it is, and the 1.6 SDK is not out yet. Has 1.6 been released into
the wild? If so, do you know where I can download the image for my G1
dev phone to test w/?

Thanks,

Chris
--~--~---------~--~----~------------~-------~--~----~

2. ColorStateList creation

I want to create color state list from xml file containing a selector.
ColorStateList createFromXml(Resources r, XmlPullParser parser) but i
can't figure out what parameters to pass. I guess i can use :
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
XmlPullParser parser = factory.newPullParser();
to obtain the parser but what about the xml file that i want to parse.
Thanks
--~--~---------~--~----~------------~-------~--~----~

3. How to open or close the soft keyboard by code

4. Drawable tilemode repat only vertically

5. How to open or close the soft keyboard by code

6. Any Twitter clients supporting ACTION_SEND?

7. Recommended uses of a class extending android.app.Application