title: run a task on ui thread from fragment
body: <p>how to run a task on ui thread. I am trying to run a task on ui thread </p>
  
  <pre><code>  MainActivity.this.runOnUiThread(new Runnable() {
  
                  @Override
                  public void run() {
                      Toast.makeText(MainActivity.this, 
                          "Mytask finished", 
                          Toast.LENGTH_SHORT).show();
                  }
              });
  </code></pre>