Skip to content

Commit

Permalink
Style the TextViews by using the styles.xml file and remove redundant…
Browse files Browse the repository at this point in the history
… attributes thereafter (#2011)
  • Loading branch information
Austinepass authored Oct 19, 2020
1 parent 37f64ff commit 351a72e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,32 @@

<TextView
android:id="@+id/profile_management_text_view"
style="@style/Caption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/mid_grey_30"
android:fontFamily="sans-serif-medium"
android:paddingStart="36dp"
android:paddingTop="28dp"
android:paddingEnd="36dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_profile_management_label"
android:textColor="@color/colorPrimary"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@id/edit_profiles_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/edit_profiles_text_view"
style="@style/Body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:fontFamily="sans-serif"
android:onClick="@{(v) -> viewModel.onEditProfilesClicked()}"
android:paddingStart="36dp"
android:paddingTop="20dp"
android:paddingEnd="36dp"
android:paddingBottom="20dp"
android:onClick="@{(v) -> viewModel.onEditProfilesClicked()}"
android:text="@string/administrator_controls_edit_profiles"
android:textColor="@color/oppiaPrimaryTextDark"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,32 @@

<TextView
android:id="@+id/profile_management_text_view"
style="@style/Caption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/oppiaGreyBackground"
android:fontFamily="sans-serif-medium"
android:paddingStart="16dp"
android:paddingTop="28dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_profile_management_label"
android:textColor="@color/colorPrimary"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@id/edit_profiles_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/edit_profiles_text_view"
style="@style/Body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@{commonViewModel.selectedFragmentIndex == viewModel.itemIndex? @color/adminHighlighted : @color/white}"
android:fontFamily="sans-serif"
android:onClick="@{(v) -> viewModel.onEditProfilesClicked()}"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:onClick="@{(v) -> viewModel.onEditProfilesClicked()}"
android:text="@string/administrator_controls_edit_profiles"
android:textColor="@color/oppiaPrimaryTextDark"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
10 changes: 3 additions & 7 deletions app/src/main/res/layout/administrator_controls_profile_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,32 @@

<TextView
android:id="@+id/profile_management_text_view"
style="@style/Heading5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/mid_grey_30"
android:fontFamily="sans-serif-medium"
android:paddingStart="16dp"
android:paddingTop="28dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_profile_management_label"
android:textColor="@color/colorPrimary"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@id/edit_profiles_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/edit_profiles_text_view"
style="@style/Body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:fontFamily="sans-serif"
android:onClick="@{(v) -> viewModel.onEditProfilesClicked()}"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:onClick="@{(v) -> viewModel.onEditProfilesClicked()}"
android:text="@string/administrator_controls_edit_profiles"
android:textColor="@color/oppiaPrimaryTextDark"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down

0 comments on commit 351a72e

Please sign in to comment.