Laggy UI due to frequent textview update - Use of Threading

In my app I have a Color Picker, and I have a onColorChanged() method in which I get the color from the picker, convert it from an Integer Color to Hex Color and set it to a textview. The color picker has a dot, which you drag around circle to change color, and the onColorChanged() gets called as you drag around this dot, making the color update very frequently, resulting in a laggy or choppy experience. This is my onColorChanged() method:\[code\]picker.setOnColorChangedListener(new OnColorChangedListener() { @Override public void onColorChanged(int color) { // Convert hex and set to textview int colorInt = picker.getColor(); String hexFormated = String.format("%08X", (0xFFFFFFFF & colorInt)); etColor.setText(hexFormated); } });\[/code\]Is there a way to make this process smother? My brother told me something about Multi-threading, which I'm not familiar with. I looked up threading and tried something like this, but didn't help:\[code\]picker.setOnColorChangedListener(new OnColorChangedListener() { @Override public void onColorChanged(int color) { runOnUiThread(new Runnable(){ @Override public void run(){ // Convert hex and set to textview int colorInt = picker.getColor(); String hexFormated = String.format("%08X", (0xFFFFFFFF & colorInt)); etColor.setText(hexFormated); } }); }});\[/code\]
 
Top