Updating a TextView with a SeekBar's value (ultra-slow)

Posted by Peter Bjorn on Stack Overflow See other posts from Stack Overflow or by Peter Bjorn
Published on 2011-02-22T15:18:16Z Indexed on 2011/02/22 15:25 UTC
Read the original article Hit count: 255

Filed under:
|
|
|
|

Now look at that! I am having trouble with one of the simplest goals: updating a plain TextView with the value of a SeekBar.

This is my approach:

    @Override
public void onProgressChanged(SeekBar seekBar, int progress,
        boolean fromUser) {
    if (fromUser) {
        mInfoText.setText(mFunction.getUserFriendlyString(progress));
    }
}

It basically works, but it kind of blocks the whole UI when I'm dragging. (Note: I tried both View.post() and Activity.runOnUiThread()).

Am I overlooking something?

© Stack Overflow or respective owner

Related posts about android

Related posts about update