ListView sometimes not calling onScrollStateChanged() when stop scrolling

by Mark Carter » Sat, 26 Mar 2011 12:38:11 GMT


Sponsored Links
 Normally this works fine - when scrolling stops, onScrollStateChanged() is 
called with SCROLL_STATE_IDLE.

However, sometimes it just isn't called. This can be observed from one touch 
to the next (i.e. it's not an implementation detail).

This is a problem, because I use the scroll state to determine when to 
pause/resume intensive background thread work.

Anyone got a workaround?

-- 



Other Threads

1. MediaPlayer and Amr

I used MediaPlayer for play an amr file and it work good. Now I'd like
to play an amr stream progressive. I must use a my socket connection
to get audio stream (no rtp no http but a private protocol). Can I
play a buffer amr using ParcelFileDescriptor.fromSocket(_sc); ?

I read the doc about ParcelFileDescriptor but is not clear how must be
used. I written that little code but it does't work

if (_pfd==null){
    // INIT THE PLAYER
   _pfd = ParcelFileDescriptor.fromSocket(_sc);
   player.setDataSource(_pfd.getFileDescriptor());
   player = new MediaPlayer();
    Parcel data = null;
   data = Parcel.obtain();
   ' HEADER AMR
   data.writeString("#!AMR");
 _pfd.writeToParcel(data, 0);
}
else{
  ' WRITE FRAME AUDIO
   Parcel data = null;
   data = Parcel.obtain();
   data.writeByteArray(_byBuf);
  _pfd.writeToParcel(data, 0);
    if (_iNAudioFrames==300){  // play the stream after 300 frames
received
        player.prepare();
        player.start();
 }
}

somebody can help ? Is possible do it ?



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

2. Project Idea....Not sure if its possible!

Hi guys thiss is my first time posting and I really have no clue of
the capabilties of Android etc so pease bear with me.

Ok basically what I would like to do is create an app using gps, which
tracks the direction and speed the user is moving.

 now the next part is the part im not sure if it is possible.

 I need the app to either track other users movements or recieve info
from other users about their movements(directions and speed).
The other users would be using the same app but on seperate devices.
The users would be within no more than 30 meters apart.

Does anybody know if this would be possible, and how difficult it
would be if possible?

I'm trying to avoid using wifi but if this is not possible I may have
to change my idea a bit and look into it...


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

3. Uniquely identifying a phone via an Http request

4. Screen Orientation Change

5. SDK 1.6 and emulator sdcard problem

6. Mobile phone accelaration sensor

7. 绛斿: Low-level network data?