Skip to content

Commit

Permalink
Use left-aligned text instead of centered text in cooking mode for ac…
Browse files Browse the repository at this point in the history
…cessability reasons #257

Reverted some changes that broke the ability to scroll the page's text.
  • Loading branch information
flauschtrud committed Dec 13, 2024
1 parent 50e19a2 commit 648d9a5
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions app/src/main/res/layout/fragment_cooking_assistant_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,23 @@
android:layout_height="match_parent"
android:padding="32dp">

<LinearLayout
android:id="@+id/cooking_assistant_layout"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@id/cooking_assistant_controls"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<TextView
android:id="@+id/cooking_assistant_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center"
android:paddingTop="64dp"
android:paddingBottom="32dp"
android:padding="32dp"
android:text="@{viewModel.title}"
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
android:textColor="?attr/colorPrimary" />
Expand All @@ -29,13 +38,13 @@
android:id="@+id/cooking_assistant_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/cooking_assistant_title"
app:layout_constraintStart_toStartOf="parent"
android:minHeight="@dimen/min_height_for_accessibility"
android:scrollbars="vertical"
android:text="@{viewModel.text}"
android:textAppearance="@style/TextAppearance.AppCompat.Large" />

</LinearLayout>

<com.flauschcode.broccoli.recipe.cooking.CookingAssistantControls
android:id="@+id/cooking_assistant_controls"
android:layout_width="wrap_content"
Expand All @@ -46,6 +55,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cooking_assistant_layout"
controls:maxSteps="@{viewModel.maxSteps}"
controls:position="@{viewModel.position}" />

Expand Down

0 comments on commit 648d9a5

Please sign in to comment.