[Android] Prevent going back to UI

Geoffrey Métais git at videolan.org
Thu Feb 21 16:49:58 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 21 10:56:43 2019 +0100| [0e1f01b6535334a425fe22b0c55252e7f96a7773] | committer: Geoffrey Métais

Prevent going back to UI

> https://code.videolan.org/videolan/vlc-android/commit/0e1f01b6535334a425fe22b0c55252e7f96a7773
---

 vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt b/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt
index 93ab377a8..28fc0ffac 100644
--- a/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt
@@ -119,6 +119,10 @@ class OnboardingActivity : AppCompatActivity(), ViewPager.OnPageChangeListener,
         if (count == 4) onCustomizedChanged(true)
     }
 
+    override fun onBackPressed() {
+        if (viewPager.currentItem != 0) super.onBackPressed()
+    }
+
     private fun selectPage(index: Int) {
         //Navigation button states
         if (index == 0) {



More information about the Android mailing list