OnTouchListener is not able to change ImageResource

by Justin Anderson » Mon, 07 Sep 2009 09:13:10 GMT


Sponsored Links
 I'm not sure offhand why this crashes, but it could be any number of
reasons...  If you could post the logcat output, that would be very helpful.

Also, I was wondering what you were trying to accomplish with this?  If you
are trying to change the image when a touch event occurs and then have it
change back when the touch event is done, you may want to consider using a
selector drawable instead...

It allows you to specify a single drawable that will change based on the
state of the object... i.e. onFocus, onPressed, etc....

I just barely figured out how to do that and there wasn't a whole lot of
documentation available.  If that is what you are trying to do I will post
again with how to do that...

Thanks,
Justin

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------






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



Other Threads

1. How to properly implement ParcelFileDescriptor.openFile() method.

Here is the full error:

04-12 10:36:04.626: ERROR/UriTexture(18929): Unable to load image from
URI content://com.gnugu.secretboxplus.imageprovider/test.jpg
04-12 10:36:04.636: WARN/System.err(18929):
java.io.FileNotFoundException
04-12 10:36:04.636: WARN/System.err(18929):     at
android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:
123)
04-12 10:36:04.636: WARN/System.err(18929):     at
android.content.ContentProviderProxy.openAssetFile(ContentProviderNative.java:
575)
04-12 10:36:04.636: WARN/System.err(18929):     at
android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:
510)
04-12 10:36:04.636: WARN/System.err(18929):     at
android.content.ContentResolver.openInputStream(ContentResolver.java:
345)
04-12 10:36:04.636: WARN/System.err(18929):     at
com.cooliris.media.UriTexture.createFromUri(UriTexture.java:106)
04-12 10:36:04.646: WARN/System.err(18929):     at
com.cooliris.media.UriTexture.load(UriTexture.java:192)
04-12 10:36:04.646: WARN/System.err(18929):     at
com.cooliris.media.RenderView.loadTextureAsync(RenderView.java:213)
04-12 10:36:04.646: WARN/System.err(18929):     at
com.cooliris.media.RenderView.access$600(RenderView.java:31)
04-12 10:36:04.646: WARN/System.err(18929):     at
com.cooliris.media.RenderView$TextureLoadThread.load(RenderView.java:
1002)
04-12 10:36:04.646: WARN/System.err(18929):     at
com.cooliris.media.RenderView$TextureLoadThread.run(RenderView.java:
986)





-- 

2. Unable to compile a fully working AOSP android for Hero

Because you don't have all the drivers. Some hardware is supported through
proprietary binary blobs that run in user space. For example the OpenGL ES
hardware support library.

That's why, even you need to extract them from a device or from the recovery
images at developer.htc.com when you want to make an AOSP build that runs on
an ADP1.




> 

3. You Need An Extra Income? - Make Money Online[FINANCE4U.YOLASITE]

4. Question About Audio and Sources

5. Location

6. What version of Android to use when programming basic apps?

7. How to properly implement ParcelFileDescriptor.openFile() method.