I searched for a solution and couldn't find one so I'll ask here:
I'm trying to use setText command in the mainActivity, Until now I've used:
 MainActivity.this.runOnUiThread(new Runnable() {
                 public void run() {
                     textViewPrograss.setText(finalI + "");
                 }
             });
now I'm trying to do the same thing, but from another class so i cant use:MainActivity.this.
I was trying to use code i found on another question with no success,This is the code:
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
    Log.d("UI thread", "I am the UI thread");
}});
Any suggestions?
 
     
     
     
     
    