Dispatch event from children to parent

by arnouf » Sat, 11 Apr 2009 03:28:39 GMT

Sponsored Links
 Hi all,

I tried some stuffs, but i didn't find yet the solution, so

I've a Layout containing some ImageView.

I manage the TouchEvent on the layout, with a setOnTouchListener, to
launch animation when user slide on screen. If I do a slide on an
Image, nothing happens. So I would like that the animation is launched
when user slide on an image.

I tried to use the dispatch event from my ImageView, but my app crash
always...I get a NullPointer but I don't finf where...the logs are not
really explicit...see below
Do you have a solution or a good strategy?

Thanks for your help

04-10 19:18:38.884: ERROR/AndroidRuntime(12224):
04-10 19:18:38.884: ERROR/AndroidRuntime(12224):     at
04-10 19:18:38.884: ERROR/AndroidRuntime(12224):     at
04-10 19:18:38.884: ERROR/AndroidRuntime(12224):     at
04-10 19:18:38.884: ERROR/AndroidRuntime(12224):     at
04-10 19:18:38.884: ERROR/AndroidRuntime(12224):     at
java.lang.reflect.Method.invokeNative(Native Method)
04-10 19:18:38.884: ERROR/AndroidRuntime(12224):     at
04-10 19:18:38.884: ERROR/AndroidRuntime(12224):     at
04-10 19:18:38.884: ERROR/AndroidRuntime(12224):     at
04-10 19:18:38.884: ERROR/AndroidRuntime(12224):     at
dalvik.system.NativeStart.main(Native Method)

Other Threads

1. Load Bitmap from downloaded APK?


I have an .apk that is downloaded to my Android app. In the .apk, it
has a directory tree of images that my app needs to load and display.
Is there a way in Android that I can get an InputStream to the image
file in the .apk and use it to instantiate a Bitmap object? I have not
been successful with ClassLoader.getResourceAsStream(). I think that
gives me a JarInputStream instance, but how do I create the Bitmap
object from that? I can use getResourceAsStream to copy the file to
the device file system and instantiate no problem through
BitmapFactory, but if I have 50 images, then that file copy is so slow
and uses disk space. I'd much rather have the nicely packaged apk use
the files "in place" if I could.

I havent looked at the Android OS source code, but it must use the
resource files "in place" instead of expanding my .apk to disk, right?
If it can do it, then an app should be able to also.

Any tips?



2. Problem with catched call

Hey everybody,

I have a problem with passing extras to calls and catching them.

To make more clear what I intend to do:

  - Start a call and set extras for this intent.  This is what my current code
    for this looks like:

    Intent dialIntent=new Intent(Intent.ACTION_CALL, Uri.parse("tel:" +  
    dialIntent.putExtra("foo", true);

  - I implement a BroadcastReceiver to "catch" the call and want to access the
    extra I set when starting the activity.  This is what I have in my manifest:

    <receiver android:name=".CallReceiver">
      <intent-filter android:priority="1">
        <action android:name="android.intent.action.NEW_OUTGOING_CALL" />

    Unfortunately the intent that is passed to my CallReceiver is a

I hope it's clear what I want to do and I hope it is possible.

Thanks in advance.



3. How to set the default value for a ListPreference

4. KML + Google Map + Android

5. sdk manager exits on startup

6. Help with Location Updates

7. add menu item in other aplication