-
Notifications
You must be signed in to change notification settings - Fork 527
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
Fix #380: Hi fi input interaction views #405
Conversation
…://github.com/oppia/oppia-android into hi-fi-input-interaction-views # Conflicts: # app/src/main/res/layout/text_input_interaction_item.xml
…://github.com/oppia/oppia-android into hi-fi-input-interaction-views # Conflicts: # app/src/main/res/layout/text_input_interaction_item.xml
… hi-fi-input-interaction-views
On click of input type interaction item, it requires two clicks to display keyboard, which should actually be just a single click. thus preventing scroll due to edit text focus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, there is one case in which the new state does not start from the top-position:
add this line
binding.stateRecyclerView.smoothScrollToPosition(0)
at the end of StateFragmentPresenter
-> processEphemeralStateResult
function.
I fixed input view focus issue because of which the scroll was happening. |
…ToPosition(0) in processEphemeralStateResult
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM--thanks @nikitamarysolomanpvt! I had some comments that should definitely be addressed, but the solution seems sensible based on my understanding of focus behavior on Android. Also, I tried it out locally and it seems to work quite well.
app/src/main/java/org/oppia/app/customview/interaction/FractionInputInteractionView.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/player/state/StateFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
Thanks Nikita! Is it possible you can attach an image/gif so I can see how this works please? |
@nikitamarysolomanpvt This PR looks good to me including Ben's suggestions. Just reply to this comment and Chantel's comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
|
Done |
…://github.com/oppia/oppia-android into hi-fi-input-interaction-views
When the input is empty, can we make the "Submit" button disabled? Also can we make the blue boxes' bottom be the same height as the blue boxes' top padding? Otherwise the functionality of the text input LGTM! |
Explanation
Whenever state is changed the scroll view should start from the top everytime.For this removed the focus from edittext.
Checklist
Reference Mocks
https://xd.adobe.com/spec/e2239cf4-9cde-4c08-5296-25316c1f0a14-9412/screen/4d4e4bd8-3755-41fc-bf83-3dcff5d5eee1/Lesson-1-a-ii-Exploration-Player-Text-Input-No-Ans
https://xd.adobe.com/spec/e2239cf4-9cde-4c08-5296-25316c1f0a14-9412/screen/eeed0f6c-54ca-4371-ab23-5199abd87f28/Lesson-1-a-ii-Exploration-Player-Text-Input-Keyboa
https://xd.adobe.com/spec/e2239cf4-9cde-4c08-5296-25316c1f0a14-9412/screen/d66097bf-8421-41d8-bfda-2450d6e98dea/Lesson-1-a-i-Exploration-Player-Fraction-Input-No-
https://xd.adobe.com/spec/e2239cf4-9cde-4c08-5296-25316c1f0a14-9412/screen/249c3349-605b-4569-bbe9-1a017ab90101/Lesson-1-a-i-Exploration-Player-Fraction-Input-No-
https://xd.adobe.com/spec/e2239cf4-9cde-4c08-5296-25316c1f0a14-9412/screen/c4b0dfb3-53b4-491e-a759-818e096183fd/Lesson-1-a-v-Exploration-Player-Numeric-Input-No-A
Checklist