<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. Eclipse + ADT + ant +make: Complex project structure

Hello,

In the process of creating a multi-platform 3D engine, I am currently
having hard times configuring Eclipse properly to handle my project
structure. What is causing my problems is the fact that my project has
a fairly complex structure. I'll try to explain:

My test application uses a custom GLSurfaceView (a derivation of
GLSurfaceView) which is declared and implemented in my SDK. The
application contains Java and C++ code, and so does the SDK. So, each
one produces a JAR archive, and a so library. The SDK's so library's C+
+ code is linked against several static libraries (some third-party,
and 3 internal).

The directory structure is as follows:

    some_dir
    |-->Products
    |    |--> MyApp
    |    |    |--> Src
    |    |    |    |--> *.cpp & *.java files (in subdirs)
    |    |    |--> Inc
    |    |    |    |--> *.h files
    |    |    |--> Makefiles
    |    |    |    |--> Android
    |    |    |    |    |--> Makefile, build.xml, res/,
AndroidManifest, ...
    |--> SDK
    |    |--> Lib1
    |    |    |--> Src
    |    |    |    |--> *.cpp files
    |    |    |--> Inc
    |    |    |    |--> *.h files
    |    |    |--> Makefiles
    |    |    |    |--> Android
    |    |    |    |    |--> Makefile
    |    |--> Lib2
    |    |    |--> Src
    |    |    |    |--> *.cpp files
    |    |    |--> Inc
    |    |    |    |--> *.h files
    |    |    |--> Makefiles
    |    |    |    |--> Android
    |    |    |    |    |--> Makefile
    |    |--> Lib3
    |    |    |--> Src
    |    |    |    |--> *.cpp files
    |    |    |--> Inc
    |    |    |    |--> *.h files
    |    |    |--> Makefiles
    |    |    |    |--> Android
    |    |    |    |    |--> Makefile
    |    |--> MySDK
    |    |    |--> Src
    |    |    |    |--> *.cpp & *.java files (in subdirs)
    |    |    |--> Inc
    |    |    |    |--> *.h files
    |    |    |--> Makefiles
    |    |    |    |-->Android
    |    |    |    |    |--> Makefile

So long I have been able to build the full bundle using makefiles.
Each project can be compiled in several flavors (depending on target
devices hardware capabilities, debug/release mode, OpenGLES1 or
OpenGLES2 ).

I would like to use the Eclipse IDE for convenience. I have managed to
import the projects and trigger their build through ant & make
scripts, but I haven't found a way to easily configure what "flavor" I
want to build. Also,I can only create my project as "General/Project"
type, which does not seem to be aware of methods, classes, etc...

Eclipse projects are in the "Makefiles/Android" directories.

What I would like is a way to handle:
    - source "out-of-project-tree"
    - android mixed java/c++ projects (JNI + SWIG + so) which are not
applications
    - Compile configurations (debug/release, GLES1/GLES2, ...)

Is there any ?

Thanks,
Florent.

-- 

2. IP Camera + Canvas?

Hi all!

I'm doing an application which consists on displays images from an
external ip camera. I use a http client and a web service to obtain
frames and through requests to the web service i can also move the
camera and make zoom. Looking for the view to render the frames, i
obviously read the documentation of graphics2D, I used imageview to
make some examples but i noticed  that existed something called canvas
for drawing dinamical changing graphics. Then I wondered myself if
canvas would be useful for me.

Screen of the app:

---------------------------------
|              /\               |
|                               |
|                               |
|                               |
|  <  (ImageView)   >  |
|                               |
|                               |
|               \/              |
---------------------------------

My app will received image periodically, I have associated it  a timer
that asks request every 4 seconds. If the user touchs one of the
arrows (buttons) the camera move on that way and continue receiving
frames.

Is canvas useful in my aplication? Sorry for the question and if it
has no sense but i don t understand how canvas work very well and as
my imageview changes dinamically i thought canvas would be good idea.

I also looking for advices or suggestions to my app so i m open-mind
to whatever you would like to say

Thank in advanced

Nstor

-- 

3. XXJD1 atau DXJC4.. pilih mana.?

4. How can I get all the name of activities in the android system ?

5. x10

6. Juice Defende

7. WiFi Kantor