我有一个活动,在服务器响应成功后,我想显示进度条几秒钟/几分钟,然后在几分钟后解除进度条并更改活动。我该怎么做?
以下是我的代码:
以下是我的代码:
public void conditions() throws JSONException {
if (m_oResponseobject.getString("resultdescription").equalsIgnoreCase("Transaction Successful")) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
CProgressBar.getInstance().showProgressBar(getApplicationContext(), "Please wait while rediecting to website");
}
}, 3000);
CProgressBar.getInstance().hideProgressBar();
Intent i = new Intent(CDealAppListingDetails.this, CMainActivity.class);
startActivity(i);
}
}