mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
Enable multi line snackbar option
This commit is contained in:
parent
200d4a6bb6
commit
f2a9a41840
@ -28,7 +28,7 @@ dependencies {
|
||||
compile 'com.google.zxing:core:3.0.1'
|
||||
compile 'com.jpardogo.materialtabstrip:library:1.0.9'
|
||||
compile 'it.neokree:MaterialNavigationDrawer:1.3.1'
|
||||
compile 'com.nispok:snackbar:2.7.4'
|
||||
compile 'com.nispok:snackbar:2.9.1'
|
||||
compile 'com.getbase:floatingactionbutton:1.8.0'
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ import android.graphics.Color;
|
||||
import com.nispok.snackbar.Snackbar;
|
||||
import com.nispok.snackbar.Snackbar.SnackbarDuration;
|
||||
import com.nispok.snackbar.SnackbarManager;
|
||||
import com.nispok.snackbar.enums.SnackbarType;
|
||||
import com.nispok.snackbar.listeners.ActionClickListener;
|
||||
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
@ -48,6 +49,7 @@ public class Notify {
|
||||
|
||||
Snackbar bar = Snackbar.with(activity)
|
||||
.text(text)
|
||||
.type(SnackbarType.MULTI_LINE)
|
||||
.duration(SnackbarDuration.LENGTH_LONG);
|
||||
|
||||
switch (style) {
|
||||
@ -67,7 +69,8 @@ public class Notify {
|
||||
|
||||
public static Showable createNotify (Activity activity, int resId, int duration, Style style) {
|
||||
final Snackbar bar = Snackbar.with(activity)
|
||||
.text(resId);
|
||||
.text(resId)
|
||||
.type(SnackbarType.MULTI_LINE);
|
||||
if (duration == LENGTH_INDEFINITE) {
|
||||
bar.duration(SnackbarDuration.LENGTH_INDEFINITE);
|
||||
} else {
|
||||
@ -104,6 +107,7 @@ public class Notify {
|
||||
final Snackbar bar = Snackbar.with(activity)
|
||||
.text(msg)
|
||||
.actionLabel(resIdAction)
|
||||
.type(SnackbarType.MULTI_LINE)
|
||||
.actionListener(new ActionClickListener() {
|
||||
@Override
|
||||
public void onActionClicked(Snackbar snackbar) {
|
||||
|
Loading…
Reference in New Issue
Block a user