1
0
mirror of https://github.com/nerzhul/ownCloud-SMS-App.git synced 2026-08-23 06:13:04 +00:00

Add a label for progression, show it to user and fix sms restauration.

This is almost finished but needs some polish
This commit is contained in:
Loic Blot
2016-12-08 21:15:58 +01:00
parent 13ad6237fe
commit 9bb0a7d2f2
7 changed files with 70 additions and 26 deletions
@@ -68,6 +68,7 @@ public class RestoreMessagesActivity extends AppCompatActivity {
TextView tv_error = (TextView) findViewById(R.id.tv_error_default_smsapp);
tv_error.setText(R.string.error_make_default_sms_app);
findViewById(R.id.tv_restore_finished).setVisibility(View.INVISIBLE);
findViewById(R.id.tv_progress_value).setVisibility(View.INVISIBLE);
Button fix_button = (Button) findViewById(R.id.button_fix_permissions);
final Button launch_restore = (Button) findViewById(R.id.button_launch_restore);
final ProgressBar pb = (ProgressBar) findViewById(R.id.progressbar_restore);
@@ -159,5 +160,14 @@ public class RestoreMessagesActivity extends AppCompatActivity {
startActivity(finalIntent);
}
public void onProgressUpdate(Integer value) {
TextView tv_progress = (TextView) findViewById(R.id.tv_progress_value);
if (tv_progress.getVisibility() == View.INVISIBLE) {
tv_progress.setVisibility(View.VISIBLE);
}
tv_progress.setText(value.toString() + " " + getString(R.string.x_messages_restored));
}
private static final String TAG = RestoreMessagesActivity.class.getSimpleName();
}