From 59bce328c3ceab2f2cdd0cb7b5d45b4092d64844 Mon Sep 17 00:00:00 2001 From: Daniel Ziegenberg Date: Tue, 9 Jun 2020 17:35:58 +0200 Subject: [PATCH] replace anonymous new OnNavigationBlockedListener() with lambda Signed-off-by: Daniel Ziegenberg --- .../flocke/andotp/Activities/IntroScreenActivity.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/shadowice/flocke/andotp/Activities/IntroScreenActivity.java b/app/src/main/java/org/shadowice/flocke/andotp/Activities/IntroScreenActivity.java index dd18ce8e..0a5dd226 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/Activities/IntroScreenActivity.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/Activities/IntroScreenActivity.java @@ -49,7 +49,6 @@ import androidx.viewpager.widget.ViewPager; import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputLayout; import com.heinrichreimersoftware.materialintro.app.IntroActivity; -import com.heinrichreimersoftware.materialintro.app.OnNavigationBlockedListener; import com.heinrichreimersoftware.materialintro.app.SlideFragment; import com.heinrichreimersoftware.materialintro.slide.FragmentSlide; import com.heinrichreimersoftware.materialintro.slide.SimpleSlide; @@ -128,12 +127,9 @@ public class IntroScreenActivity extends IntroActivity { .build() ); - addOnNavigationBlockedListener(new OnNavigationBlockedListener() { - @Override - public void onNavigationBlocked(int position, int direction) { - if (position == 2) - authenticationFragment.flashWarning(); - } + addOnNavigationBlockedListener((position, direction) -> { + if (position == 2) + authenticationFragment.flashWarning(); }); addOnPageChangeListener(new ViewPager.OnPageChangeListener() {