Toast -> SnackBar

This commit is contained in:
ligi 2016-01-05 00:12:35 +01:00
parent f098048c58
commit 40a0ff8888
2 changed files with 4 additions and 4 deletions

View file

@ -3,13 +3,13 @@ package org.ligi.passandroid.ui;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.os.Bundle; import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.ViewConfiguration; import android.view.ViewConfiguration;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.Toast;
import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request; import com.squareup.okhttp.Request;
@ -218,9 +218,8 @@ public class PassViewActivityBase extends PassAndroidActivity {
passStore.setCurrentPass(newPass); passStore.setCurrentPass(newPass);
optionalPass = passStore.getCurrentPass(); optionalPass = passStore.getCurrentPass();
refresh(); refresh();
Toast.makeText(PassViewActivityBase.this,
"Pass Updated", Snackbar.make(getWindow().getDecorView(), R.string.pass_updated,Snackbar.LENGTH_LONG).show();
Toast.LENGTH_LONG).show();
} }
}); });

View file

@ -103,4 +103,5 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS
<string name="unzip_pass_dialog_message">Please wait...</string> <string name="unzip_pass_dialog_message">Please wait...</string>
<string name="action_update">update</string> <string name="action_update">update</string>
<string name="no_calendar_app_found">No Calendar-App found</string> <string name="no_calendar_app_found">No Calendar-App found</string>
<string name="pass_updated">Pass Updated</string>
</resources> </resources>