mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 06:21:31 +01:00
Fill the Finish
tab (5) of the tutorial
This commit is contained in:
parent
e1f88e546d
commit
9213d8241e
2 changed files with 44 additions and 2 deletions
|
@ -29,9 +29,23 @@ class TutorialFragmentFinish(): Fragment(), UIObject {
|
|||
|
||||
override fun applyTheme() {
|
||||
tutorial_finish_container.setBackgroundColor(dominantColor)
|
||||
setButtonColor(tutorial_finish_button_start, vibrantColor)
|
||||
}
|
||||
|
||||
fun go() {
|
||||
override fun setOnClicks() {
|
||||
super.setOnClicks()
|
||||
tutorial_finish_button_start.setOnClickListener{ finishTutorial() }
|
||||
}
|
||||
|
||||
override fun adjustLayout() {
|
||||
super.adjustLayout()
|
||||
|
||||
// Different text if opened again later (from settings)
|
||||
if (launcherPreferences.getBoolean("startedBefore", false))
|
||||
tutorial_finish_button_start.text = "Back to Settings"
|
||||
}
|
||||
|
||||
private fun finishTutorial() {
|
||||
if (!launcherPreferences.getBoolean("startedBefore", false)){
|
||||
launcherPreferences.edit()
|
||||
.putBoolean("startedBefore", true) // never auto run this again
|
||||
|
|
|
@ -2,9 +2,37 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:custom="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/tutorial_finish_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorPrimary"
|
||||
tools:context=".tutorial.tab.TutorialFragmentFinish"/>
|
||||
tools:context=".tutorial.tab.TutorialFragmentFinish">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tutorial_finish_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="You are ready to get started!\n\n I hope this provides great value to you!\n\n- Finn M Glas (alias 'the developer')"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tutorial_finish_button_start"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.8" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/tutorial_finish_button_start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="32sp"
|
||||
android:text="Start Launcher"
|
||||
android:textAllCaps="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.6" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Add table
Reference in a new issue