-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image region selection doesn't work in RTL layouts #3780
Comments
@veena14cs assigning to you since I think this might've been missed during the RTL audit. |
Follow-up: strangely, Saturn is still clickable but oddly. I can't seem to click on any of the other planets. I can't quite figure out how this is wrong. |
/cc @anandwana001 |
Sure @BenHenning I will look into this. |
@veena14cs As I tried to look into this issue, in RTL, only Jupiter and Saturn are working, that too Jupiter is selecting the wrong one. @rt4914 @veena14cs @BenHenning How are we defining the |
Canvas doesn't support RTL. We are using RectF() to draw region if I am not wrong. Co-ordinates for RTL is always from left-to-right instead of right-to-left. |
yes, @veena14cs Could you check
Sample Example |
I tried to put some hardcoded values and also tried flipping left and right values but couldn't get it working. Let me try Sample Example |
I tried to put a log to check the values we are passing in
|
Can we force that particular layout to be LTR in RTL device? As it is a image and doesn't change for RTL. I have created PR PTAL @anandwana001 @rt4914 and @BenHenning. |
* Update selection_interaction_item.xml * Update selection_interaction_item.xml * Update return_to_topic_button_item.xml * Update return_to_topic_button_item.xml * Update image_region_selection_interaction_item.xml * Update image_region_selection_interaction_item.xml * Update image_region_selection_interaction_item.xml * Update image_region_selection_interaction_item.xml * Update image_region_selection_interaction_item.xml * fixed image region selection * Add tests * Update ImageRegionSelectionInteractionViewTest.kt * Update ImageRegionSelectionInteractionViewTest.kt * Update ImageRegionSelectionInteractionViewTest.kt * Update ImageRegionSelectionInteractionViewTest.kt * Update app/src/main/java/org/oppia/android/app/utility/ClickableAreasImage.kt Co-authored-by: Ben Henning <[email protected]> * Update ClickableAreasImage.kt * Update ClickableAreasImage.kt * Remove ignore and add RunOn Expresso platform * Update ImageRegionSelectionInteractionViewTest.kt * Add oppiaTest rule * Update ImageRegionSelectionInteractionViewTest.kt Co-authored-by: Ben Henning <[email protected]>
For searching context, this issue was found in 0.6-alpha (MR3). |
Describe the bug
Image region selection has issues in RTL layouts. Regions don't seem to be selected when tapping around the image.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Planets should be selected in this interaction. RTL shouldn't change how image region selection works.
Screenshots
None
Device
The text was updated successfully, but these errors were encountered: