ListView listener problems

by tatebn » Mon, 30 Aug 2010 22:53:09 GMT


Sponsored Links
 I'm using a ListAction and I'm having some trouble with my listeners.
I'm using onListItemClick to catch any item clicks, which works fine
unless I add an OnLongClickListener to the list items.  In that case
the long click works but the short click doesn't register.  I've tried
adding an OnClickListener to the items individually as I had done with
the long click.  This works, but the regular click fires every time
the long click does.  How do I keep these things separate?

Thanks,
Brandon

--



ListView listener problems

by William Ferguson » Tue, 31 Aug 2010 06:27:39 GMT


 Return false from onLongClick if you have handled the click as a long
click.




--


Sponsored Links


Other Threads

1. CPU utilization in frame animation

Hi all,

I am trying to do frame animation, I have around 250 Images, to do it . It
is like a man running. I tried to use the AnimateDrawable. But in terms of
CPU utilization & current of the devices it is costly. Please suggest a way
so that a CPU & current will be at minimal & I will be able to do a frame
animation also.

thanks,
satish

-- 

2. Trouble with 3GP files on Android2.2

Hi guys,

Having problems playing 3GP files on Android2.2 devices. Hope you can
help.

Tested them on a HTC Hero (running 2.1) and they work fine, however
when I tested them on an HTC Desire (2.2), keep getting the dreaded
"Sorry, this video cannot be played".

Our server supports byte ranges, and the mime type is correct, e.g:

Content-Type: video/3gpp; name=fantasy.3gp

To debug, I ran them under the Android Emulator using an AVD running
2.2 (API level 8), and in the logs I can see the following errors:

E/MediaPlayer(  479): error (1, -2147483648)
E/MediaPlayer(  479): Error (1,-2147483648)
D/VideoView(  479): Error: 1,-2147483648


Here is the complete verbose log

[ 09-23 14:16:28.180   358:0x166 I/SearchDialog ]
Starting (as ourselves)
#Intent;action=android.intent.action.SEARCH;launchFlags=0x10000000;component
=com.android.browser/.BrowserActivity;S.query=http%3A%2F
%2F10.0.2.2%3A8082%2Fdev-wapapp%2Fcontent%2F
test%2Fvideos%2Fsoft%2Ffantasy.3gp%3Bjsessionid%3D2892C99EA1FE99FD%3Fx
%3Df635a3110bdcef83255ae
2dc8fe75a59%26pa%3D1%26b%3D9;S.user_query=http%3A%2F
%2F10.0.2.2%3A8082%2Fdev-wapapp%2Fcontent%2Ftest
%2Fvideos%2Fsoft%2Ffantasy.3gp%3Bjsessionid%3D2892C99EA1FE99FD%3Fx
%3Df635a3110bdcef83255ae2dc8
fe75a59%26pa%3D1%26b%3D9;end

[ 09-23 14:16:28.190    96:0x60 I/ActivityManager ]
Starting activity: Intent { act=android.intent.action.SEARCH
flg=0x10000000 cmp=com.android.browser/
.BrowserActivity (has extras) }

[ 09-23 14:16:28.619   358:0x166 W/SuggestionsAdapter ]
Tried to change cursor after adapter was closed.

[ 09-23 14:16:30.329   358:0x185 D/dalvikvm ]
GC_FOR_MALLOC freed 7801 objects / 390080 bytes in 153ms


[ 09-23 14:16:30.511    96:0x60 I/ActivityManager ]
Starting activity: Intent { act=android.intent.action.VIEW dat=http://
10.0.2.2:8082/dev-wapapp/conte
nt/test/videos/soft/fantasy.3gp;jsessionid=2892C99EA1FE99FD?
x=f635a3110bdcef83255ae2dc8fe75a59
&pa=1&b=9 typ=video/3gpp cmp=com.android.gallery/
com.android.camera.MovieView }

[ 09-23 14:16:30.800    96:0x65 I/WindowManager ]
Setting rotation to 1, animFlags=1

[ 09-23 14:16:30.810    96:0x65 I/ActivityManager ]
Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/1/2
nav=3/1 orien=2 layout=18 uiMo
de=17 seq=25}

[ 09-23 14:16:31.311    96:0x95 I/ActivityManager ]
Displayed activity com.android.gallery/com.android.camera.MovieView:
511 ms (total 511 ms)

[ 09-23 14:16:31.649   479:0x1df D/MediaPlayer ]
Couldn't open file on client side, trying server side

[ 09-23 14:16:31.649    34:0x194 I/StagefrightPlayer ]
setDataSource('http://10.0.2.2:8082/dev-wapapp/content/test/videos/
soft/fantasy.3gp;jsessionid
=2892C99EA1FE99FD?x=f635a3110bdcef83255ae2dc8fe75a59&pa=1&b=9')

[ 09-23 14:16:32.959   358:0x166 W/IInputConnectionWrapper ]
showStatusIcon on inactive InputConnection

[ 09-23 14:16:33.570   479:0x1e3 E/MediaPlayer ]
error (1, -2147483648)

[ 09-23 14:16:33.570   479:0x1df E/MediaPlayer ]
Error (1,-2147483648)

[ 09-23 14:16:33.591   479:0x1df D/VideoView ]
Error: 1,-2147483648


Any help would be appreciated.

-- 

3. Hot Rek: SAP (E-Sourcing) Consultant-Ashburn, VA-Long Term

4. Evaluating javascript URLs in WebView fails at first attempt

5. Status bar style

6. Camcorder on eclair-x86

7. Samsung Galaxy S Contacts Sync problem to CYNCZ Server