在两个片段之间的过渡处圈出进度条

时间:2017-05-03 19:49:47

标签: android fragment progress-bar navigation-drawer transition

我创建了一个包含片段的导航抽屉,每个片段需要多次加载。 所以我想在转换过程中实现一个圆形进度条,如下面的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());

1 个答案:

答案 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();
}