-
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 #151: Lowfi numeric input interaction view part 2 #223
Fix #151: Lowfi numeric input interaction view part 2 #223
Conversation
…d NumericInput from dummy data welcome.json ,welcome.json file "init_state_name"modified to "Numeric input",
…d NumericInput from dummy data welcome.json
… numbertextinputlayout onbutton click. on button click listner implemented
@nikitamarysolomanpvt Approach is correct. You can proceed ahead and finish this PR. |
Ok Thank You |
Regarding PR description.
|
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.
Have some nit changes to do.
app/src/main/java/org/oppia/app/player/state/StateFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/player/state/StateFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/player/state/StateFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/player/state/StateFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/player/state/StateFragmentPresenterTest.kt
Outdated
Show resolved
Hide resolved
Okay |
Test case is in progress |
domain/src/main/assets/welcome.json
Outdated
@@ -160,7 +160,14 @@ | |||
} | |||
], | |||
"confirmed_unclassified_answers": [], | |||
"customization_args": {}, | |||
"customization_args": { |
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.
This is added for testing numeric input interaction view
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.
Thanks @nikitamarysolomanpvt. Took a deep dive on the PR. Please let me know if you have any questions.
app/src/main/java/org/oppia/app/customview/inputInteractionView/NumericInputInteractionView.kt
Outdated
Show resolved
Hide resolved
attributes() | ||
} | ||
|
||
constructor(context: Context?, placeholder: String) : this(context!!) { |
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.
Do we need to dynamically create the view? I wouldn't expect that since we're inflating it using LayoutInflater rather than directly constructing it.
app/src/main/java/org/oppia/app/customview/inputInteractionView/NumericInputInteractionView.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/customview/inputInteractionView/NumericInputInteractionView.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/customview/inputInteractionView/NumericInputInteractionView.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/activity/InputInteractionViewTestActivityTest.kt
Outdated
Show resolved
Hide resolved
launchedActivity = activityTestRule.launchActivity(intent) | ||
onView(withId(R.id.test_number_input_interaction_view)).perform(ViewActions.clearText(), ViewActions.typeText("9")) | ||
activityTestRule.activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE | ||
activityTestRule.activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT |
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.
This isn't sufficient to trigger a configuration change. We can use ActivityScenario.recreate() for this purpose. The orientation change actually may not be needed; recreate may be enough to fully recreate the activity.
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.
Okay
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.
@nikitamarysolomanpvt Check TopicTrainFragmentTest file you can do this similarly here.
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.
Its pending
app/src/sharedTest/java/org/oppia/app/activity/InputInteractionViewTestActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/activity/InputInteractionViewTestActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/activity/InputInteractionViewTestActivityTest.kt
Show resolved
Hide resolved
…ated as per PR review of Ben, other nit changes
…ated as per PR review of Ben, other nit changes
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.
Thanks @nikitamarysolomanpvt. This LGTM! Please feel free to submit once my comments are addressed.
app/src/main/java/org/oppia/app/customview/interaction/NumericInputInteractionView.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/customview/interaction/NumericInputInteractionView.kt
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/activity/InputInteractionViewTestActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/activity/InputInteractionViewTestActivityTest.kt
Show resolved
Hide resolved
…View low-fi (#246) * NumberInputInteractionView dynamically created on state interaction id NumericInput from dummy data welcome.json ,welcome.json file "init_state_name"modified to "Numeric input", * NumberInputInteractionView dynamically created on state interaction id NumericInput from dummy data welcome.json * added fetch button, and fetch textview to fetch the data from dynamic numbertextinputlayout onbutton click. on button click listner implemented * nit changes * nit changes * nit changes * nit changes * nit changes * numericInputTypeView test case is in progress * numericInputTypeView test case is in progress * nit changes as per #223 * nit changes as per #223 * On configuration changes save and restore the text of numericInputType * Test Cases for NumericInputInteractionView, Moved test case to StateFragment * Test Cases for NumericInputInteractionView, Moved test case to StateFragment,PR suggestions updated * PR suggestions updated * PR suggestions updated * Merge branch 'develop' of https://github.com/oppia/oppia-android into topic-player-multiple-tabs # Conflicts: # app/build.gradle # app/src/main/AndroidManifest.xml # app/src/main/res/values/styles.xml * nit changes as per PR review * nit changes as per PR review * nit changes as per PR review * nit changes as per PR review * Number input test Activity test cases * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * setReal type in getPendingAnswer * updated test cases, disabled long click to prevent pasting value * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * nit changes * NumericInputInteractionViewTestActivity renamed to InputInteractionViewTestActivity and test case updated * nit changes * nit changes * nit changes * nit * NumericInputInteractionView attributes are moved to xml,testcases updated as per PR review of Ben, other nit changes * NumericInputInteractionView attributes are moved to xml,testcases updated as per PR review of Ben, other nit changes * TextInputInteractionView * TextInputInteractionView * test cases * nit * nit * nit * nit * nit * Merge branches 'develop' and 'lowfi-input-interaction-views' of https://github.com/oppia/oppia-android into lowfi-input-interaction-views # Conflicts: # app/src/main/java/org/oppia/app/activity/InputInteractionViewTestActivity.kt # app/src/main/java/org/oppia/app/customview/interaction/NumericInputInteractionView.kt # app/src/main/res/layout/activity_numeric_input_interaction_view_test.xml # app/src/main/res/values/dimens.xml # app/src/sharedTest/java/org/oppia/app/activity/InputInteractionViewTestActivityTest.kt * nit * nit * nit * nit * Merge branches 'develop' and 'text-input-lowfi-numeric-input-interaction-view-part-2' of https://github.com/oppia/oppia-android into text-input-lowfi-numeric-input-interaction-view-part-2 # Conflicts: # app/src/sharedTest/java/org/oppia/app/activity/InputInteractionViewTestActivityTest.kt * nit * NumberWithUnitsInputInteractionView * nit * nit * NumberWithUnitsInputInteractionView * moved InputInteractionViewTestActivityTest to testing folder
Replicated from #190
Explanation
Part 1: #220
Part 2: This PR contains Numeric input view and Fix #151 .
Reference Mock
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
Reference Design Doc
https://docs.google.com/document/d/1QigNdZeMBy-JjHW26QH4qT0UtCyzfvW0xEaStSdY9gM/edit?usp=sharing
Checklist