Skip to content

Commit 6cd0769

Browse files
committed
Merge branch 'fix/missing-context' into 'master'
Disable character creation finish button after click See merge request fmasa/pv239-project!77
2 parents cd1a78a + 2e89eb1 commit 6cd0769

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

app/src/main/java/cz/muni/fi/rpg/ui/characterCreation/CharacterCreationFragment.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package cz.muni.fi.rpg.ui.characterCreation
22

3+
import android.content.Context
34
import android.os.Bundle
45
import android.view.View
56
import android.widget.Toast
@@ -94,6 +95,9 @@ class CharacterCreationFragment(
9495
return@setOnClickListener
9596
}
9697

98+
buttonNext.isEnabled = false
99+
buttonNextProgress.visibility = View.VISIBLE
100+
97101
saveCharacter(
98102
info,
99103
statsData,

app/src/main/res/layout/fragment_character_creation.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@
6060
app:layout_constraintStart_toStartOf="parent"
6161
app:layout_constraintTop_toTopOf="parent" />
6262

63+
<ProgressBar
64+
android:id="@+id/buttonNextProgress"
65+
android:visibility="gone"
66+
app:layout_constraintEnd_toStartOf="@id/buttonNext"
67+
app:layout_constraintTop_toTopOf="@id/buttonNext"
68+
app:layout_constraintBottom_toBottomOf="@id/buttonNext"
69+
android:layout_width="20dp"
70+
android:layout_height="20dp"/>
6371
<androidx.appcompat.widget.AppCompatButton
6472
android:id="@+id/buttonNext"
6573
style="@style/Widget.MaterialComponents.Button.TextButton"

0 commit comments

Comments
 (0)