Skip to content

Commit

Permalink
Update text styling
Browse files Browse the repository at this point in the history
  • Loading branch information
shobhitagarwal1612 committed Dec 5, 2024
1 parent e378266 commit 514cfdd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ground/src/main/res/layout/multiple_choice_checkbox_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="@{item.isSelected}"
android:fontFamily="@font/google_sans"
android:onClickListener="@{() -> viewModel.toggleItem(item)}"
android:padding="16dp"
android:text="@{ item.isOtherOption ? @string/other : item.option.label }"
android:textColor="@color/md_theme_onSurface"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Option 1" />
Expand All @@ -58,7 +61,10 @@
android:id="@+id/user_response_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/text_500"
android:inputType="text"
android:textColor="@color/md_theme_onSurface"
android:textSize="16sp"
android:visibility="@{item.isOtherOption ? View.VISIBLE: View.GONE}"
app:textChangedListener="@{viewModel.otherTextWatcher}" />
</com.google.android.material.textfield.TextInputLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@
android:layout_height="wrap_content"
android:buttonTint="?attr/colorPrimary"
android:checked="@{item.isSelected}"
android:fontFamily="@font/google_sans"
android:onClickListener="@{() -> viewModel.toggleItem(item)}"
android:padding="16dp"
android:text="@{ item.isOtherOption ? @string/other : item.option.label }"
android:textColor="@color/md_theme_onSurface"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Option 1" />
Expand All @@ -59,7 +62,10 @@
android:id="@+id/user_response_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/text_500"
android:inputType="text"
android:textColor="@color/md_theme_onSurface"
android:textSize="16sp"
android:visibility="@{item.isOtherOption ? View.VISIBLE: View.GONE}"
app:textChangedListener="@{viewModel.otherTextWatcher}" />
</com.google.android.material.textfield.TextInputLayout>
Expand Down
10 changes: 7 additions & 3 deletions ground/src/main/res/layout/task_frag_with_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@

<TextView
android:id="@+id/data_collection_header"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="16dp"
android:fontFamily="@font/text_500"
android:padding="16dp"
android:text="@{viewModel.task.label}"
android:textColor="@color/md_theme_onSurface"
android:textSize="16sp"
app:drawableStartCompat="@drawable/ic_question_answer"
app:layout_constraintBottom_toTopOf="@+id/task_container"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Sample question?" />
Expand All @@ -50,9 +53,10 @@
android:layout_height="0dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
app:layout_constraintBottom_toTopOf="@+id/action_buttons"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/data_collection_header"
app:layout_constraintBottom_toTopOf="@+id/action_buttons" />
app:layout_constraintTop_toBottomOf="@+id/data_collection_header" />

<include
android:id="@+id/action_buttons"
Expand Down

0 comments on commit 514cfdd

Please sign in to comment.