for?(int?i?=?0;?i?<?100;?i++)?{
????????????????????try?{
????????????????????????Thread.sleep(1000);//1秒后更新一下
????????????????????????builder.setDefaults(Notification.FLAG_ONLY_ALERT_ONCE);
????????????????????????//設置進度,max最大進度值,progress當前進度,indeterminate不確定的
????????????????????????builder.setProgress(100,i,false);
????????????????????????getManager().notify(2,builder.build());
????????????????????}?catch?(InterruptedException?e)?{
????????????????????????e.printStackTrace();
????????????????????}
????????????????}
2019-07-04