Changeset View
Changeset View
Standalone View
Standalone View
app/src/main/java/it/reyboz/bustorino/ActivityIntro.kt
| Show All 26 Lines | class ActivityIntro : GeneralActivity(), IntroFragment.IntroListener { | ||||
| private lateinit var closeBottomButton: ImageButton | private lateinit var closeBottomButton: ImageButton | ||||
| private var restartMain = true | private var restartMain = true | ||||
| override fun onCreate(savedInstanceState: Bundle?) { | override fun onCreate(savedInstanceState: Bundle?) { | ||||
| super.onCreate(savedInstanceState) | super.onCreate(savedInstanceState) | ||||
| setContentView(R.layout.activity_intro) | setContentView(R.layout.activity_intro) | ||||
| //check default settings and apply them | |||||
| checkApplyDefaultSettingsValues() | |||||
| viewPager = findViewById(R.id.viewPager) | viewPager = findViewById(R.id.viewPager) | ||||
| btnBackward = findViewById(R.id.btnPrevious) | btnBackward = findViewById(R.id.btnPrevious) | ||||
| btnForward = findViewById(R.id.btnNext) | btnForward = findViewById(R.id.btnNext) | ||||
| closeBottomButton = findViewById(R.id.btnCompactClose) | closeBottomButton = findViewById(R.id.btnCompactClose) | ||||
| val extras = intent.extras | val extras = intent.extras | ||||
| if(extras!=null){ | if(extras!=null){ | ||||
| restartMain = extras.getBoolean(RESTART_MAIN) | restartMain = extras.getBoolean(RESTART_MAIN) | ||||
| ▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | override fun closeIntroduction() { | ||||
| val editor = pref.edit() | val editor = pref.edit() | ||||
| editor.putBoolean(PreferencesHolder.PREF_INTRO_ACTIVITY_RUN, true) | editor.putBoolean(PreferencesHolder.PREF_INTRO_ACTIVITY_RUN, true) | ||||
| //use commit so we don't "lose" info | //use commit so we don't "lose" info | ||||
| editor.commit() | editor.commit() | ||||
| finish() | finish() | ||||
| } | } | ||||
| } | } | ||||
| No newline at end of file | No newline at end of file | ||||
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register