Merge pull request #1116 from sgallese/feature/update-app-intro

Implement skipPressed for Intro, update to latest version of AppIntro
This commit is contained in:
2021-09-23 07:06:24 -05:00
committed by GitHub
3 changed files with 14 additions and 8 deletions

View File

@@ -21,8 +21,9 @@ package org.isoron.uhabits.activities.intro
import android.graphics.Color
import android.os.Bundle
import com.github.paolorotolo.appintro.AppIntro2
import com.github.paolorotolo.appintro.AppIntroFragment
import androidx.fragment.app.Fragment
import com.github.appintro.AppIntro2
import com.github.appintro.AppIntroFragment
import org.isoron.uhabits.R
/**
@@ -30,7 +31,9 @@ import org.isoron.uhabits.R
* launched for the first time.
*/
class IntroActivity : AppIntro2() {
override fun init(savedInstanceState: Bundle?) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
showStatusBar(false)
addSlide(
@@ -61,11 +64,13 @@ class IntroActivity : AppIntro2() {
)
}
override fun onNextPressed() {}
override fun onDonePressed() {
override fun onDonePressed(currentFragment: Fragment?) {
super.onDonePressed(currentFragment)
finish()
}
override fun onSlideChanged() {}
override fun onSkipPressed(currentFragment: Fragment?) {
super.onSkipPressed(currentFragment)
finish()
}
}