This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add focus states for Bluetooth keyboard support on Edit Profile
- LEARNER-6764 - Handled enabled/disabled state through xml instead of code
- Loading branch information
1 parent
2876127
commit 1e615fb
Showing
8 changed files
with
82 additions
and
69 deletions.
There are no files selected for viewing
63 changes: 30 additions & 33 deletions
63
OpenEdXMobile/res/drawable/edx_segmented_control_left_background.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,45 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_checked="true" android:state_enabled="false" android:state_focused="true"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/edx_brand_gray_back" /> | ||
<stroke android:width="@dimen/edx_line" android:color="@color/black" /> | ||
<corners android:bottomLeftRadius="@dimen/edx_box_radius" android:bottomRightRadius="0dp" android:radius="@dimen/edx_box_radius" android:topLeftRadius="@dimen/edx_box_radius" android:topRightRadius="0dp" /> | ||
</shape> | ||
</item> | ||
<item android:state_checked="true" android:state_enabled="false"> | ||
<shape | ||
android:shape="rectangle"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/edx_brand_gray_back" /> | ||
<stroke | ||
android:width="@dimen/edx_hairline" | ||
android:color="@color/edx_brand_gray_back" /> | ||
<corners | ||
android:bottomLeftRadius="@dimen/edx_box_radius" | ||
android:bottomRightRadius="0dp" | ||
android:radius="@dimen/edx_box_radius" | ||
android:topLeftRadius="@dimen/edx_box_radius" | ||
android:topRightRadius="0dp" /> | ||
<stroke android:width="@dimen/edx_hairline" android:color="@color/edx_brand_gray_back" /> | ||
<corners android:bottomLeftRadius="@dimen/edx_box_radius" android:bottomRightRadius="0dp" android:radius="@dimen/edx_box_radius" android:topLeftRadius="@dimen/edx_box_radius" android:topRightRadius="0dp" /> | ||
</shape> | ||
</item> | ||
<item android:state_checked="true" android:state_focused="true"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/edx_brand_primary_base" /> | ||
<stroke android:width="@dimen/edx_line" android:color="@color/black" /> | ||
<corners android:bottomLeftRadius="@dimen/edx_box_radius" android:bottomRightRadius="0dp" android:radius="@dimen/edx_box_radius" android:topLeftRadius="@dimen/edx_box_radius" android:topRightRadius="0dp" /> | ||
</shape> | ||
</item> | ||
<item android:state_checked="true"> | ||
<shape | ||
android:shape="rectangle"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/edx_brand_primary_base" /> | ||
<stroke | ||
android:width="@dimen/edx_hairline" | ||
android:color="@color/edx_brand_primary_base" /> | ||
<corners | ||
android:bottomLeftRadius="@dimen/edx_box_radius" | ||
android:bottomRightRadius="0dp" | ||
android:radius="@dimen/edx_box_radius" | ||
android:topLeftRadius="@dimen/edx_box_radius" | ||
android:topRightRadius="0dp" /> | ||
<stroke android:width="@dimen/edx_hairline" android:color="@color/edx_brand_primary_base" /> | ||
<corners android:bottomLeftRadius="@dimen/edx_box_radius" android:bottomRightRadius="0dp" android:radius="@dimen/edx_box_radius" android:topLeftRadius="@dimen/edx_box_radius" android:topRightRadius="0dp" /> | ||
</shape> | ||
</item> | ||
<item android:state_focused="true"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/white" /> | ||
<stroke android:width="@dimen/edx_line" android:color="@color/black" /> | ||
<corners android:bottomLeftRadius="@dimen/edx_box_radius" android:bottomRightRadius="0dp" android:radius="@dimen/edx_box_radius" android:topLeftRadius="@dimen/edx_box_radius" android:topRightRadius="0dp" /> | ||
</shape> | ||
</item> | ||
<item> | ||
<shape | ||
android:shape="rectangle"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/white" /> | ||
<stroke | ||
android:width="@dimen/edx_hairline" | ||
android:color="@color/edx_brand_gray_back" /> | ||
<corners | ||
android:bottomLeftRadius="@dimen/edx_box_radius" | ||
android:bottomRightRadius="0dp" | ||
android:radius="@dimen/edx_box_radius" | ||
android:topLeftRadius="@dimen/edx_box_radius" | ||
android:topRightRadius="0dp" /> | ||
<stroke android:width="@dimen/edx_hairline" android:color="@color/edx_brand_gray_back" /> | ||
<corners android:bottomLeftRadius="@dimen/edx_box_radius" android:bottomRightRadius="0dp" android:radius="@dimen/edx_box_radius" android:topLeftRadius="@dimen/edx_box_radius" android:topRightRadius="0dp" /> | ||
</shape> | ||
</item> | ||
</selector> |
63 changes: 30 additions & 33 deletions
63
OpenEdXMobile/res/drawable/edx_segmented_control_right_background.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,45 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:state_checked="true" android:state_enabled="false" android:state_focused="true"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/edx_brand_gray_back" /> | ||
<stroke android:width="@dimen/edx_line" android:color="@color/black" /> | ||
<corners android:bottomLeftRadius="0dp" android:bottomRightRadius="@dimen/edx_box_radius" android:radius="@dimen/edx_box_radius" android:topLeftRadius="0dp" android:topRightRadius="@dimen/edx_box_radius" /> | ||
</shape> | ||
</item> | ||
<item android:state_checked="true" android:state_enabled="false"> | ||
<shape | ||
android:shape="rectangle"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/edx_brand_gray_back" /> | ||
<stroke | ||
android:width="@dimen/edx_hairline" | ||
android:color="@color/edx_brand_gray_back" /> | ||
<corners | ||
android:bottomLeftRadius="0dp" | ||
android:bottomRightRadius="@dimen/edx_box_radius" | ||
android:radius="@dimen/edx_box_radius" | ||
android:topLeftRadius="0dp" | ||
android:topRightRadius="@dimen/edx_box_radius" /> | ||
<stroke android:width="@dimen/edx_hairline" android:color="@color/edx_brand_gray_back" /> | ||
<corners android:bottomLeftRadius="0dp" android:bottomRightRadius="@dimen/edx_box_radius" android:radius="@dimen/edx_box_radius" android:topLeftRadius="0dp" android:topRightRadius="@dimen/edx_box_radius" /> | ||
</shape> | ||
</item> | ||
<item android:state_checked="true" android:state_focused="true"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/edx_brand_primary_base" /> | ||
<stroke android:width="@dimen/edx_line" android:color="@color/black" /> | ||
<corners android:bottomLeftRadius="0dp" android:bottomRightRadius="@dimen/edx_box_radius" android:radius="@dimen/edx_box_radius" android:topLeftRadius="0dp" android:topRightRadius="@dimen/edx_box_radius" /> | ||
</shape> | ||
</item> | ||
<item android:state_checked="true"> | ||
<shape | ||
android:shape="rectangle"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/edx_brand_primary_base" /> | ||
<stroke | ||
android:width="@dimen/edx_hairline" | ||
android:color="@color/edx_brand_primary_base" /> | ||
<corners | ||
android:bottomLeftRadius="0dp" | ||
android:bottomRightRadius="@dimen/edx_box_radius" | ||
android:radius="@dimen/edx_box_radius" | ||
android:topLeftRadius="0dp" | ||
android:topRightRadius="@dimen/edx_box_radius" /> | ||
<stroke android:width="@dimen/edx_hairline" android:color="@color/edx_brand_primary_base" /> | ||
<corners android:bottomLeftRadius="0dp" android:bottomRightRadius="@dimen/edx_box_radius" android:radius="@dimen/edx_box_radius" android:topLeftRadius="0dp" android:topRightRadius="@dimen/edx_box_radius" /> | ||
</shape> | ||
</item> | ||
<item android:state_focused="true"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/white" /> | ||
<stroke android:width="@dimen/edx_line" android:color="@color/black" /> | ||
<corners android:bottomLeftRadius="0dp" android:bottomRightRadius="@dimen/edx_box_radius" android:radius="@dimen/edx_box_radius" android:topLeftRadius="0dp" android:topRightRadius="@dimen/edx_box_radius" /> | ||
</shape> | ||
</item> | ||
<item> | ||
<shape | ||
android:shape="rectangle"> | ||
<shape android:shape="rectangle"> | ||
<solid android:color="@color/white" /> | ||
<stroke | ||
android:width="@dimen/edx_hairline" | ||
android:color="@color/edx_brand_gray_back" /> | ||
<corners | ||
android:bottomLeftRadius="0dp" | ||
android:bottomRightRadius="@dimen/edx_box_radius" | ||
android:radius="@dimen/edx_box_radius" | ||
android:topLeftRadius="0dp" | ||
android:topRightRadius="@dimen/edx_box_radius" /> | ||
<stroke android:width="@dimen/edx_hairline" android:color="@color/edx_brand_gray_back" /> | ||
<corners android:bottomLeftRadius="0dp" android:bottomRightRadius="@dimen/edx_box_radius" android:radius="@dimen/edx_box_radius" android:topLeftRadius="0dp" android:topRightRadius="@dimen/edx_box_radius" /> | ||
</shape> | ||
</item> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="@color/edx_brand_gray_x_back" /> | ||
<stroke | ||
android:width="@dimen/edx_line" | ||
android:color="@color/black" /> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<solid android:color="@color/transparent_black_13" /> | ||
<stroke | ||
android:width="@dimen/edx_line" | ||
android:color="@color/black" /> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:drawable="@color/edx_brand_gray_back" android:state_pressed="true"/> | ||
<item android:drawable="@drawable/focus_disabled_drawable" android:state_enabled="false" android:state_focused="true"/> | ||
<item android:drawable="@color/edx_brand_gray_x_back" android:state_enabled="false"/> | ||
<item android:drawable="@drawable/focus_drawable" android:state_focused="true"/> | ||
<item android:drawable="@android:color/transparent"/> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters