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
  • Loading branch information
flauschtrud committed Dec 12, 2024
1 parent 81790ea commit 76ccb86
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions app/src/main/res/layout/fragment_cooking_assistant_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,16 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/text_margin">

<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">
android:padding="32dp">

<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:padding="32dp"
android:paddingTop="64dp"
android:paddingBottom="32dp"
android:text="@{viewModel.title}"
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
android:textColor="?attr/colorPrimary" />
Expand All @@ -38,14 +29,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:gravity="center"
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 @@ -56,7 +46,6 @@
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 76ccb86

Please sign in to comment.