How to set timer in show progress method
<p>How do I set a timer in the <code>showprogress</code> method?</p>

<p>My code is below, which shows a progress bar when submit button is clicked and waits for an XML response from server. How do I set timer in this <code>showprogress</code> method so it stops after 15 seconds?</p>

<pre><code>private void showProgress()
{    
    myProgressDialog = ProgressDialog.show(
        LoginScreen.this, null, "Processing please wait...", true); 
}


if (activeNetworkInfo.isConnected()) {
    btnLogin.setOnClickListener(new OnClickListener() {
        public  void onClick(View view) {
            String pinemptycheck = pin.getText().toString();
            String mobileemptycheck = mobile.getText().toString();
            if (pinemptycheck.trim().equals("")||(mobileemptycheck.trim().equals("")))
                Toast.makeText(getApplicationContext(), "Please Enter Correct Information", Toast.LENGTH_LONG).show();
            } 

            showProgress();
            postLoginData();
</code></pre>
