Android - Display the loading text
<p>I am trying to display Loading text only when its loading.
The problem is im setting it to visible and straight after to invisible once finished loading. But text never has a chance to update. Is there a way to force refresh the screen, or maybe there is another way to do this?
Thanks</p>

<p>This is my code</p>

<pre><code>SearchBtn = (Button) findViewById(R.id.SearchButton);

  SearchBtn.setOnClickListener(new OnClickListener() 
  {
     public void onClick(View arg0) 
     {
       //this is never seen because its set straight after to invisible
       LoadingText.setVisibility(View.VISIBLE); 

       SearchFor(EditSearchField.getText().toString()); // all loading done here

       LoadingText.setVisibility(View.INVISIBLE); 

       HideKeyboard();

   }
   });
</code></pre>
