【发布时间】:2012-07-05 20:14:45
【问题描述】:
我想在单击 à 按钮时弹出一个 ProgressDialog。通过单击此按钮,它开始解析 XML 文件并在 ListView 中显示结果。
我试过了,但它不起作用:
// --- NEWS BUTTON
OnClickListener newsButtonListener = new OnClickListener()
{
@Override
public void onClick(View actuelView)
{
// Navigation to another screen
Intent intent = new Intent(Lausanne_HC.this, NewsViewController.class);
startActivity(intent);
ProgressDialog dialog = ProgressDialog.show(Lausanne_HC.this, "",
"Loading. Please wait...", true);
}
};
ImageButton newsButton = (ImageButton) findViewById(R.id.newsButton);
newsButton.setOnClickListener(newsButtonListener);
我能做什么?
谢谢
【问题讨论】:
-
p-xr.com/… ibm.com/developerworks/opensource/library/x-android 这将对您有所帮助。如果您不打算通过 Web 服务调用从服务器获取任何排序数据。比您必须实现一个简单的线程并使其休眠所需的时间量(以毫秒为单位)。例如。 3000 毫秒 = 3 秒
标签: android onclick progressdialog