之后当我按下手机上的后退按钮时,我关闭了wifi或移动数据网络。
进度条旋转不会停止,后退按钮不起作用。
>>> class Thing:
... @staticmethod
... def say_hello():
... print('hello!')
... Thing.say_hello()
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 5, in Thing
AttributeError: type object 'Thing' has no attribute 'say_hello'
>>>
答案 0 :(得分:1)
尝试设置进度条的cancelable
属性。
mProgressDialog = new ProgressDialog(this);
mProgressDialog.setCancelable(true);