我创建了一个包含片段的导航抽屉,每个片段需要多次加载。 所以我想在转换过程中实现一个圆形进度条,如下面的gmail应用程序:screenshot gmail app
主要Activity.class
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("hello.xml");
Foo foo = (Foo) ctx.getBean("theFoo");
System.out.println("Color : " + foo.getColor() +" Shape : " + foo.getShape());
答案 0 :(得分:0)
private ProgressDialog mProgressDialog;
mProgressDialog = new ProgressDialog(this);
mProgressDialog.setMessage("Working ...");
private void doSomeWorkMethod() {
mProgressDialog.show();
doSomeWork . . .
mProgressDialog.dismiss();
Snackbar.make(v, "Work Complete.", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}