I am fairly new to android (and Java for that matter). I have an
onClick fuction for my listview. What I want it to do is changing the
text of a textview, set a seekbar progress to 0, and then load a new
song. The problem is that it loads the new song (which takes a while),
and THEN changes the textview and seekbar.
I want the textview and seekbar to change right away, then load the
song. Here's my function:
public void onListItemClick(ListView parent, View v, int position,
long id) {
//This stuff should happen immediately
Globals.song = items[position];
title.setText(Globals.artist + " - " + Globals.song);
seek.setProgress(0);
//Then this should happen
Music.playSong(Music.youtubeMp4(Globals.artist,Globals.song));
}
Like I said, the textview and seekbar doesn't change until the song
url is retrieved, and then the song buffers and starts. They should
change right away, since that code is first. Can someone explain why
this is and how to prevent it?
I want the textview and seekbar to change right away so the user has
some feedback when they click, otherwise it looks like nothing happens
for a few seconds while the song is loading.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en