summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/android/app/src/main/java/org/citron/citron_emu/adapters/SetupAdapter.kt4
-rw-r--r--src/android/app/src/main/res/layout-w600dp/page_setup.xml37
-rw-r--r--src/android/app/src/main/res/layout/page_setup.xml61
3 files changed, 53 insertions, 49 deletions
diff --git a/src/android/app/src/main/java/org/citron/citron_emu/adapters/SetupAdapter.kt b/src/android/app/src/main/java/org/citron/citron_emu/adapters/SetupAdapter.kt
index 8fc49d89a..5c4f51f64 100644
--- a/src/android/app/src/main/java/org/citron/citron_emu/adapters/SetupAdapter.kt
+++ b/src/android/app/src/main/java/org/citron/citron_emu/adapters/SetupAdapter.kt
@@ -31,7 +31,7 @@ class SetupAdapter(val activity: AppCompatActivity, pages: List<SetupPage>) :
override fun bind(model: SetupPage) {
if (model.stepCompleted.invoke() == StepState.COMPLETE) {
binding.buttonAction.setVisible(visible = false, gone = false)
- binding.textConfirmation.setVisible(true)
+ binding.textConfirmation?.setVisible(true)
}
binding.icon.setImageDrawable(
@@ -68,7 +68,7 @@ class SetupAdapter(val activity: AppCompatActivity, pages: List<SetupPage>) :
override fun onStepCompleted() {
ViewUtils.hideView(binding.buttonAction, 200)
- ViewUtils.showView(binding.textConfirmation, 200)
+ binding.textConfirmation?.let { ViewUtils.showView(it, 200) }
ViewModelProvider(activity)[HomeViewModel::class.java].setShouldPageForward(true)
}
}
diff --git a/src/android/app/src/main/res/layout-w600dp/page_setup.xml b/src/android/app/src/main/res/layout-w600dp/page_setup.xml
index 9e0ab8ecb..5a8566c0b 100644
--- a/src/android/app/src/main/res/layout-w600dp/page_setup.xml
+++ b/src/android/app/src/main/res/layout-w600dp/page_setup.xml
@@ -34,28 +34,41 @@
android:gravity="center"
android:textColor="?attr/colorOnSurface"
android:textStyle="bold"
- app:layout_constraintBottom_toTopOf="@+id/text_description"
+ app:layout_constraintBottom_toTopOf="@+id/scroll_description"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_weight="2"
tools:text="@string/welcome" />
- <com.google.android.material.textview.MaterialTextView
- android:id="@+id/text_description"
- style="@style/TextAppearance.Material3.TitleLarge"
+ <ScrollView
+ android:id="@+id/scroll_description"
android:layout_width="0dp"
android:layout_height="0dp"
- android:gravity="center"
- android:textSize="20sp"
- android:paddingHorizontal="16dp"
+ android:fillViewport="true"
+ android:scrollbars="vertical"
+ android:fadeScrollbars="false"
+ android:clipToPadding="false"
+ android:scrollbarStyle="outsideOverlay"
app:layout_constraintBottom_toTopOf="@+id/button_action"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/text_title"
- app:layout_constraintVertical_weight="2"
- app:lineHeight="30sp"
- tools:text="@string/welcome_description" />
+ app:layout_constraintVertical_weight="2">
+
+ <com.google.android.material.textview.MaterialTextView
+ android:id="@+id/text_description"
+ style="@style/TextAppearance.Material3.TitleLarge"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingHorizontal="16dp"
+ android:paddingVertical="16dp"
+ android:textAlignment="center"
+ android:textSize="20sp"
+ app:lineHeight="30sp"
+ tools:text="@string/welcome_description" />
+
+ </ScrollView>
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text_confirmation"
@@ -72,7 +85,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/text_description"
+ app:layout_constraintTop_toBottomOf="@+id/scroll_description"
app:layout_constraintVertical_weight="1"
app:lineHeight="30sp" />
@@ -88,7 +101,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/text_description"
+ app:layout_constraintTop_toBottomOf="@+id/scroll_description"
tools:text="Get started" />
</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/src/android/app/src/main/res/layout/page_setup.xml b/src/android/app/src/main/res/layout/page_setup.xml
index 535abcf02..ddfed5c95 100644
--- a/src/android/app/src/main/res/layout/page_setup.xml
+++ b/src/android/app/src/main/res/layout/page_setup.xml
@@ -18,7 +18,7 @@
app:layout_constraintHeight_min="110dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintVertical_chainStyle="spread"
+ app:layout_constraintVertical_chainStyle="packed"
app:layout_constraintWidth_max="220dp"
app:layout_constraintWidth_min="110dp"
app:layout_constraintVertical_weight="3"
@@ -28,65 +28,56 @@
android:id="@+id/text_title"
style="@style/TextAppearance.Material3.DisplaySmall"
android:layout_width="0dp"
- android:layout_height="0dp"
+ android:layout_height="wrap_content"
android:textAlignment="center"
android:textColor="?attr/colorOnSurface"
android:textStyle="bold"
- app:layout_constraintBottom_toTopOf="@+id/text_description"
+ android:layout_marginBottom="16dp"
+ app:layout_constraintBottom_toTopOf="@+id/scroll_description"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/icon"
- app:layout_constraintVertical_weight="1.3"
tools:text="@string/welcome" />
- <com.google.android.material.textview.MaterialTextView
- android:id="@+id/text_description"
- style="@style/TextAppearance.Material3.TitleLarge"
+ <ScrollView
+ android:id="@+id/scroll_description"
android:layout_width="0dp"
android:layout_height="0dp"
- android:textAlignment="center"
- android:textSize="20sp"
- android:paddingHorizontal="16dp"
+ android:fillViewport="true"
+ android:scrollbars="vertical"
+ android:fadeScrollbars="false"
+ android:clipToPadding="false"
+ android:scrollbarStyle="outsideOverlay"
+ android:paddingVertical="8dp"
app:layout_constraintBottom_toTopOf="@+id/button_action"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/text_title"
- app:layout_constraintVertical_weight="2"
- app:lineHeight="30sp"
- tools:text="@string/welcome_description" />
+ app:layout_constraintVertical_weight="2">
- <com.google.android.material.textview.MaterialTextView
- android:id="@+id/text_confirmation"
- style="@style/TextAppearance.Material3.TitleLarge"
- android:layout_width="wrap_content"
- android:layout_height="0dp"
- android:paddingHorizontal="16dp"
- android:paddingTop="24dp"
- android:textAlignment="center"
- android:textSize="30sp"
- android:visibility="invisible"
- android:text="@string/step_complete"
- android:textStyle="bold"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/text_description"
- app:layout_constraintVertical_weight="1"
- app:lineHeight="30sp" />
+ <com.google.android.material.textview.MaterialTextView
+ android:id="@+id/text_description"
+ style="@style/TextAppearance.Material3.TitleLarge"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingHorizontal="16dp"
+ android:textAlignment="center"
+ android:textSize="20sp"
+ app:lineHeight="30sp"
+ tools:text="@string/welcome_description" />
+
+ </ScrollView>
<com.google.android.material.button.MaterialButton
android:id="@+id/button_action"
android:layout_width="wrap_content"
android:layout_height="56dp"
- android:layout_marginTop="16dp"
android:layout_marginBottom="48dp"
android:textSize="20sp"
app:iconGravity="end"
app:iconSize="24sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/text_description"
- tools:text="Get started" />
+ app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>