mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-07 01:23:38 +02:00
Added progress bar to importing dialog
This commit is contained in:
@@ -49,6 +49,7 @@ import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -651,6 +652,7 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
|
||||
final int colorWarning = Helper.resolveColor(context, R.attr.colorWarning);
|
||||
|
||||
View dview = LayoutInflater.from(context).inflate(R.layout.dialog_import_progress, null);
|
||||
ProgressBar pbWait = dview.findViewById(R.id.pbWait);
|
||||
TextView tvLog = dview.findViewById(R.id.tvLog);
|
||||
tvLog.setText(null);
|
||||
|
||||
@@ -697,6 +699,11 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
|
||||
new SimpleTask<Void>() {
|
||||
private SpannableStringBuilder ssb = new SpannableStringBuilderEx();
|
||||
|
||||
@Override
|
||||
protected void onPreExecute(Bundle args) {
|
||||
pbWait.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onProgress(CharSequence status, Bundle data) {
|
||||
ssb.append(status).append("\n");
|
||||
@@ -705,6 +712,7 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Bundle args) {
|
||||
pbWait.setVisibility(View.GONE);
|
||||
ok.setEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user