fix the bug about progressbar still visible when resume mainactivity