<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. Mapping Keycodes and Scancodes to generate an Intent.

Hi guys.
Good day.
I have a problem about mapping the scancode and keycode to generate an
event.
Can you please tell me where to call the Intent for a specific key.
For example I have a new application and just one touch of a key it
will start the intent even if I am in another application.
Just like how the Home button or Volume keys behavior.

Thanks.

-- 

2. How to save state of check box status

I have a code which displays list of media files in list view. When I click
them its playing and check box checking. But I want to live this check box
status after I re-start the program.
i.e Once check box status live it should not change at any point of time.
I am really new to android and I am trying to solve this problem since long
time. Can any one help me to solve this problem.
my code is as follows
@Override
    protected void onListItemClick(ListView l, View v, int position, long
id) {
        super.onListItemClick(l, v, position, id);


        getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

        String keyword = value[position];
        mediaPlayer.reset();
        try
        {
            mediaPlayer.setDataSource("/sdcard/"+keyword+".mp4");
            mediaPlayer.prepare();
            mediaPlayer.start();
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }
thanks in advance

-- 
Shekharkothmirkar.
Have a nice day.

-- 

3. How to display ProgressDialog while starting Activity?

4. Keycodes and Scancodes Mapping for Intent

5. The server could not process your apk. Try again.

6. [Wts] motorola milestone xt720, defy,mile 2

7. Masalah lain WTA : App Gingerbread