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?



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


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.



2. Trouble with 3GP files on Android2.2

Hi guys,

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

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)

[ 09-23 14:16:28.190    96:0x60 I/ActivityManager ]
Starting activity: Intent { act=android.intent.action.SEARCH
.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://
&pa=1&b=9 typ=video/3gpp }

[ 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
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 ]

[ 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