Skip to content

Commit

Permalink
Fixes part of #2258: Changes in Add Profile Activity[a11y] (#2456)
Browse files Browse the repository at this point in the history
* Fix #2258: Changes in Add Profile Activity[a11y]

Fixes Issue 3 of #2258, Changed the button to diabled according to the
state and TextColor as per Chantel's suggesstion

* Using color resource instead of hardcoded color

* Same changes applied to other orientation files
  • Loading branch information
Arjupta authored Feb 3, 2021
1 parent 2bcd511 commit 2ed1870
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions app/src/main/res/layout-land/add_profile_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@string/add_profile_allow_download_heading"
android:textColor="@{viewModel.validPin ? @color/oppiaPrimaryTextDark : @color/grey}"
android:textColor="@{viewModel.validPin ? @color/oppiaPrimaryTextDark : @color/accessible_grey}"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -204,7 +204,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@string/add_profile_allow_download_sub"
android:textColor="@color/light_grey"
android:textColor="@color/accessible_light_grey"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/add_profile_activity_allow_download_heading_text_view"
Expand All @@ -231,6 +231,7 @@
android:layout_marginEnd="28dp"
android:background="@{viewModel.isButtonActive() ? @drawable/state_button_primary_background : @drawable/start_button_transparent_background}"
android:clickable="@{viewModel.isButtonActive()}"
android:enabled="@{viewModel.isButtonActive()}"
android:gravity="center"
android:text="@string/add_profile_create_btn"
android:textAllCaps="true"
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout-sw600dp-land/add_profile_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@string/add_profile_allow_download_heading"
android:textColor="@{viewModel.validPin ? @color/oppiaPrimaryTextDark : @color/grey}"
android:textColor="@{viewModel.validPin ? @color/oppiaPrimaryTextDark : @color/accessible_grey}"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -197,7 +197,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@string/add_profile_allow_download_sub"
android:textColor="@color/light_grey"
android:textColor="@color/accessible_light_grey"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/add_profile_activity_allow_download_heading_text_view"
Expand All @@ -223,6 +223,7 @@
android:layout_marginTop="60dp"
android:background="@{viewModel.isButtonActive() ? @drawable/state_button_primary_background : @drawable/start_button_transparent_background}"
android:clickable="@{viewModel.isButtonActive()}"
android:enabled="@{viewModel.isButtonActive()}"
android:gravity="center"
android:text="@string/add_profile_create_btn"
android:textAllCaps="true"
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout-sw600dp-port/add_profile_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@string/add_profile_allow_download_heading"
android:textColor="@{viewModel.validPin ? @color/oppiaPrimaryTextDark : @color/grey}"
android:textColor="@{viewModel.validPin ? @color/oppiaPrimaryTextDark : @color/accessible_grey}"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -194,7 +194,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@string/add_profile_allow_download_sub"
android:textColor="@color/light_grey"
android:textColor="@color/accessible_light_grey"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/add_profile_activity_allow_download_heading_text_view"
Expand All @@ -220,6 +220,7 @@
android:layout_marginTop="60dp"
android:background="@{viewModel.isButtonActive() ? @drawable/state_button_primary_background : @drawable/start_button_transparent_background}"
android:clickable="@{viewModel.isButtonActive()}"
android:enabled="@{viewModel.isButtonActive()}"
android:gravity="center"
android:text="@string/add_profile_create_btn"
android:textAllCaps="true"
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout/add_profile_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@string/add_profile_allow_download_heading"
android:textColor="@{viewModel.validPin ? @color/oppiaPrimaryTextDark : @color/grey}"
android:textColor="@{viewModel.validPin ? @color/oppiaPrimaryTextDark : @color/accessible_grey}"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -202,7 +202,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@string/add_profile_allow_download_sub"
android:textColor="@color/light_grey"
android:textColor="@color/accessible_light_grey"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/add_profile_activity_allow_download_heading_text_view"
Expand All @@ -229,6 +229,7 @@
android:layout_marginEnd="28dp"
android:background="@{viewModel.isButtonActive() ? @drawable/state_button_primary_background : @drawable/start_button_transparent_background}"
android:clickable="@{viewModel.isButtonActive()}"
android:enabled="@{viewModel.isButtonActive()}"
android:gravity="center"
android:text="@string/add_profile_create_btn"
android:textAllCaps="true"
Expand Down

0 comments on commit 2ed1870

Please sign in to comment.