Replace export/import snackbars by toasts

pull/157/head
M66B 6 years ago
parent 2699b34bcf
commit 351e851083

@ -66,7 +66,6 @@ import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputLayout; import com.google.android.material.textfield.TextInputLayout;
import org.json.JSONArray; import org.json.JSONArray;
@ -613,13 +612,13 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
@Override @Override
protected void onExecuted(Bundle args, Void data) { protected void onExecuted(Bundle args, Void data) {
Snackbar.make(view, R.string.title_setup_exported, Snackbar.LENGTH_LONG).show(); Toast.makeText(ActivitySetup.this, R.string.title_setup_exported, Toast.LENGTH_LONG).show();
} }
@Override @Override
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
if (ex instanceof IllegalArgumentException) if (ex instanceof IllegalArgumentException)
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show(); Toast.makeText(ActivitySetup.this, ex.getMessage(), Toast.LENGTH_LONG).show();
else else
Helper.unexpectedError(getSupportFragmentManager(), ex); Helper.unexpectedError(getSupportFragmentManager(), ex);
} }
@ -889,15 +888,15 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
@Override @Override
protected void onExecuted(Bundle args, Void data) { protected void onExecuted(Bundle args, Void data) {
Snackbar.make(view, R.string.title_setup_imported, Snackbar.LENGTH_LONG).show(); Toast.makeText(ActivitySetup.this, R.string.title_setup_imported, Toast.LENGTH_LONG).show();
} }
@Override @Override
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
if (ex.getCause() instanceof BadPaddingException) if (ex.getCause() instanceof BadPaddingException)
Snackbar.make(view, R.string.title_setup_password_invalid, Snackbar.LENGTH_LONG).show(); Toast.makeText(ActivitySetup.this, R.string.title_setup_password_invalid, Toast.LENGTH_LONG).show();
else if (ex instanceof IllegalArgumentException) else if (ex instanceof IllegalArgumentException)
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show(); Toast.makeText(ActivitySetup.this, ex.getMessage(), Toast.LENGTH_LONG).show();
else else
Helper.unexpectedError(getSupportFragmentManager(), ex); Helper.unexpectedError(getSupportFragmentManager(), ex);
} }

Loading…
Cancel
Save