Skip to content
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

Fixed selecting elements in no-button widgets #3927

Merged
merged 2 commits into from
Jun 18, 2020

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Jun 17, 2020

Closes #3926

What has been done to verify that this works as intended?

I tested the fix manually.

Why is this the best possible solution? Were any other approaches considered?

The problem was that we have every single item wrapped in a FrameLayout and in our code sometimes we called:
view.getChildAt(0).setBackground (changing a child) but sometimes view.setBackground (changing a parent FrameLayout). Now we always add/remove the frame using the parent FrameLayout.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

It's a safe change that should just fix the issue. Testing select no-button widgets would be enough.

Do we need any specific form for testing your changes? If so, please attach one.

All widgets form would be enough.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • run ./gradlew checkAll and confirmed all checks still pass OR confirm CircleCI build passes and run ./gradlew connectedDebugAndroidTest locally.
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@lognaturel lognaturel added high priority Should be looked at before other PRs/issues needs testing labels Jun 17, 2020
@mmarciniak90
Copy link
Contributor

@grzesiek2010 I noticed that the remove response option does not work for this question type.
Maybe it's not totally related to this issue but it's the same result - removing added answer.

Use case:

  1. User selects some images
  2. User opens option "Remove response"
  3. User confirms removing
  4. Answers are still visible but when user changes the view, the orange frame is removed. The orange frame is also removed when user opens hierarchy view.

@grzesiek2010
Copy link
Member Author

I noticed that the remove response option does not work for this question type.
Maybe it's not totally related to this issue but it's the same result - removing added answer.

I agree, should be fixed now.

@mmarciniak90
Copy link
Contributor

Thanks, @grzesiek2010

Tested with success

Verified on Androids: 6.0, 7.0, 8.1, 9.0
Verified also on emulator with Android 5.1

Verified cases:

  • All widgets form
  • selectTest3028.xml form
  • unclick
  • remove response option
  • light/dark mode
  • rotation

@getodk-bot unlabel "needs testing"
@getodk-bot label "behavior verified"

@grzesiek2010 grzesiek2010 merged commit ab00fc3 into getodk:master Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behavior verified high priority Should be looked at before other PRs/issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can not unselect a selected item in no-button appearances after navigating back
4 participants