You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val nextButton = findViewById<Button>(R.id.nextButton)
47
56
nextButton.setOnClickListener {
48
57
val currentItem = viewPager.currentItem
49
58
if (currentItem < numPages -1) {
@@ -56,20 +65,36 @@ class OnboardingActivity : AppCompatActivity() {
56
65
finish()
57
66
} else {
58
67
// Show a snackbar and don't finish the activity
59
-
val snackbar =Snackbar.make(viewPager, "Please grant usage access permission", Snackbar.LENGTH_LONG)
68
+
val snackbar =Snackbar.make(viewPager, "Please grant usage access permission, they are necessary for the core function of the app.", Snackbar.LENGTH_LONG)
60
69
snackbar.show()
61
70
}
62
71
}
72
+
updateButtons()
73
+
}
74
+
75
+
backButton.setOnClickListener {
76
+
val currentItem = viewPager.currentItem
77
+
if (currentItem >0) {
78
+
viewPager.currentItem = currentItem -1
79
+
}
80
+
updateButtons()
63
81
}
64
82
65
83
// Update the text of the next button based on the current page
0 commit comments