title: loading screen when window opening up: Android
body: <p>i am using the Titanium studio for developing android application. a user click on item a <strong>new window</strong> is being opened which fetch data from a site and populate the tableview. so this window does take time to open.
  mean while i am fetching the data and showing loading screen like:</p>
  
  <pre><code>anotherWind.addEventListener('open', function (e) {
        activityIndicator.show();
  
        setTimeout(function(){
      e.source.close();
      activityIndicator.hide();
    }, 6000);
  });
  </code></pre>
  
  <p>the problem is at this point i'm assuming it takes <strong>6 second</strong>  to fetch and display a tableview. but in real time it may not be the case as time may vary depending upon the data </p>
  
  <p>when user click a icon it should display the loading screen only for the time data is not pulated and showed in tableview.</p>
  
  <p><em>its a kind of notification between two tasks. one when task is complted it should notify other one</em>.<br>
  how can i resolve that ?</p>