Android galleries and delayed data loading?

zigbigidorlu

New member
Joined
Apr 7, 2012
Messages
0
Reaction score
0
Points
0
I have an Android gallery that I want to load a set of data with depending on it's position, and after being there for a period of time, canceling other selections.

As it is, my code is as so:

alphasel.setOnItemSelectedListener(new OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long arg3) {
Log.d("AFTW","Alpha Sel "+position);
try {
wait(3000);
loadSeries(alphabet[position].charAt(0),0);
}
catch(InterruptedException ex){
}
}

public void onNothingSelected(AdapterView<?> arg0) {
}
});

However, the wait stacks, and I get several being loaded at the same time over the timer. How do I go about this feat?
 
Back
Top