-
Notifications
You must be signed in to change notification settings - Fork 529
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
Fixes #4470, #4471, #4472, #4473, #4474, #4708: Handle configuration change using on saved instance #4668
Closed
vrajdesai78
wants to merge
98
commits into
oppia:develop
from
vrajdesai78:handle-configuration-change-using-onSavedInstance
Closed
Fixes #4470, #4471, #4472, #4473, #4474, #4708: Handle configuration change using on saved instance #4668
Changes from 95 commits
Commits
Show all changes
98 commits
Select commit
Hold shift + click to select a range
9a7da9a
RawUserAnswer added
vrajdesai78 20280f1
Imports optimized
vrajdesai78 3625a63
Optimized import
vrajdesai78 6f64dcc
rawUserAnswer added to constructor of StateItemViewModel
vrajdesai78 002b500
Merge branch 'develop' of https://github.com/vrajdesai78/oppia-androi…
vrajdesai78 f4c93f6
Merge branch 'develop' of https://github.com/vrajdesai78/oppia-androi…
vrajdesai78 c4293c5
Platform parameter added
vrajdesai78 e8863a6
Optimized code
vrajdesai78 cf4f093
Kdoc added
vrajdesai78 1f0d530
added platformparameter in bazel
vrajdesai78 4de5907
Updated bazel
vrajdesai78 d9a79bf
Improved data pipeline and nit changes
vrajdesai78 dbd3d55
code optimized
vrajdesai78 e151b9a
Updated imageRegionSelectionInteractionViewModel
vrajdesai78 c47ef46
retained state in Selection Interaction
vrajdesai78 aa6bd6d
Made rawUserAnwer to non-null and other nit changes
vrajdesai78 b0706c0
optimized code
vrajdesai78 a99e9fb
Fixed null value of rawUserAnswer
vrajdesai78 79442b7
optimized imports
vrajdesai78 84457fa
DragAndDrop added
vrajdesai78 4d63aac
optimized code
vrajdesai78 313bb92
ImageRegion made working
vrajdesai78 59993af
Optimized code ImageRegionSelection
vrajdesai78 5a36788
Optimized code
vrajdesai78 de7aa69
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 c8587f9
Optimized code
vrajdesai78 a0c7f3e
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 959877c
Added tests for selection and drag and drop interaction
vrajdesai78 9d3d27c
optimized code
vrajdesai78 d271f85
Added proto to store dragAndDrop sort
vrajdesai78 6910fb7
Optimized code
vrajdesai78 3d4cc10
SelectionInteraction bug fixed of clearing selection
vrajdesai78 69a4181
Updated proto for DragAndDrop and added more tests
vrajdesai78 102da7b
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 db30ea2
Optimized code
vrajdesai78 a6d1cf7
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 c8ec8ee
Fixed static checks
vrajdesai78 031b5a5
Seperated text-based interactions
vrajdesai78 42987e6
Enabled platform parameter and optimized code
vrajdesai78 10a91bd
Added ToDo
vrajdesai78 427898b
Removed extra line
vrajdesai78 45bafdd
Fixed issue with DragAndDropSortInteraction
vrajdesai78 c56dd5b
Code optimized
vrajdesai78 4dc8b78
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 bae52d0
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 7c5f714
New tests added and handled edge cases
vrajdesai78 55e6605
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 69ef676
improved code
vrajdesai78 bb77a93
Nit changes and added KDoC
vrajdesai78 b0da173
Added new test to check responseHeader
vrajdesai78 23b5c69
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 47d8a44
optimized code
vrajdesai78 06a0b3d
Nit changes
vrajdesai78 0529d79
Code optimized
vrajdesai78 9a2aeca
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 13a6e18
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 bb94042
Updated tests and nit changes
vrajdesai78 5c227fd
Added KDocs
vrajdesai78 9936736
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 4be01c4
Nit changes and fixed issue with mathInputInteraction
vrajdesai78 afc35b6
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 fd0eb62
Updated comments
vrajdesai78 6d9e73a
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 4c1b677
removed extra space
vrajdesai78 2f8f8b2
Updated computer error
vrajdesai78 a5a2496
Removed test to check Real time error is disabled
vrajdesai78 175d1b2
Updated tests
vrajdesai78 54d6f47
Removed comment
vrajdesai78 679b30c
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 78ea425
Re-run CI checks
vrajdesai78 cca3fb2
Nit changes
vrajdesai78 d08a7cc
Fixed app crash error
vrajdesai78 bc0f45d
reverted back changes in tests
vrajdesai78 412c71c
Updated resetRawUserAnswer
vrajdesai78 79454cc
Merge to latest develop
vrajdesai78 ad91869
Fixed nit changes
vrajdesai78 f5acc86
.replace() used
vrajdesai78 99e087e
ToDo added
vrajdesai78 12495d5
added space
vrajdesai78 55c0d7b
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 d23e82d
removed math interaction tests
vrajdesai78 23e99e5
Imports optimized
vrajdesai78 e235b4b
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 802e0e1
Removed unnecessary import
vrajdesai78 9d5df29
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 d79221e
Added new test fixed submit time error issue
vrajdesai78 5c353ee
Merge branch 'develop' into handle-configuration-change-using-onSaved…
vrajdesai78 4725a77
Added new tests
vrajdesai78 cf93543
Merge branch 'handle-configuration-change-using-onSavedInstance' of h…
vrajdesai78 6b59e1a
Removed unncessary changes
vrajdesai78 343d46a
Fixed 100 characters limit
vrajdesai78 6fcffc9
updated test
vrajdesai78 a360f59
Re-run ci checks
vrajdesai78 650fdab
Removed animation
vrajdesai78 444406c
Optimized code
vrajdesai78 992c479
Reverted back changes for selection interaction
vrajdesai78 37f59fd
added coordinates param
vrajdesai78 ab533b6
Updated Kdoc
vrajdesai78 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ import androidx.databinding.ObservableList | |
import androidx.fragment.app.Fragment | ||
import androidx.fragment.app.FragmentManager | ||
import androidx.recyclerview.widget.RecyclerView | ||
import kotlinx.android.synthetic.main.item_selection_interaction_items.view.* | ||
import kotlinx.android.synthetic.main.multiple_choice_interaction_items.view.* | ||
import org.oppia.android.app.model.WrittenTranslationContext | ||
import org.oppia.android.app.player.state.itemviewmodel.SelectionInteractionContentViewModel | ||
import org.oppia.android.app.player.state.itemviewmodel.SelectionItemInputType | ||
|
@@ -28,12 +30,17 @@ class SelectionInteractionView @JvmOverloads constructor( | |
attrs: AttributeSet? = null, | ||
defStyleAttr: Int = 0 | ||
) : RecyclerView(context, attrs, defStyleAttr) { | ||
@field:[Inject ExplorationHtmlParserEntityType] lateinit var entityType: String | ||
@field:[Inject DefaultResourceBucketName] lateinit var resourceBucketName: String | ||
@field:[Inject ExplorationHtmlParserEntityType] | ||
lateinit var entityType: String | ||
@field:[Inject DefaultResourceBucketName] | ||
lateinit var resourceBucketName: String | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please revert style-only changes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reverted back |
||
|
||
@Inject lateinit var htmlParserFactory: HtmlParser.Factory | ||
@Inject lateinit var bindingInterface: ViewBindingShim | ||
@Inject lateinit var singleTypeBuilderFactory: BindableAdapter.SingleTypeBuilder.Factory | ||
@Inject | ||
lateinit var htmlParserFactory: HtmlParser.Factory | ||
@Inject | ||
lateinit var bindingInterface: ViewBindingShim | ||
@Inject | ||
lateinit var singleTypeBuilderFactory: BindableAdapter.SingleTypeBuilder.Factory | ||
|
||
private lateinit var selectionItemInputType: SelectionItemInputType | ||
private lateinit var entityId: String | ||
|
@@ -99,11 +106,17 @@ class SelectionInteractionView @JvmOverloads constructor( | |
singleTypeBuilderFactory.create<SelectionInteractionContentViewModel>() | ||
.registerViewBinder( | ||
inflateView = { parent -> | ||
bindingInterface.provideSelectionInteractionViewInflatedView( | ||
val checkBox = bindingInterface.provideSelectionInteractionViewInflatedView( | ||
LayoutInflater.from(parent.context), | ||
parent, | ||
/* attachToParent= */ false | ||
) | ||
if (dataList.map { it.disableAnimation }.any { it }) { | ||
checkBox.multiple_choice_radio_button.setOnCheckedChangeListener { view, _ -> | ||
view.jumpDrawablesToCurrentState() | ||
} | ||
} | ||
checkBox | ||
}, | ||
bindView = { view, viewModel -> | ||
bindingInterface.provideSelectionInteractionViewModel( | ||
|
@@ -122,11 +135,17 @@ class SelectionInteractionView @JvmOverloads constructor( | |
singleTypeBuilderFactory.create<SelectionInteractionContentViewModel>() | ||
.registerViewBinder( | ||
inflateView = { parent -> | ||
bindingInterface.provideMultipleChoiceInteractionItemsInflatedView( | ||
val radioButton = bindingInterface.provideMultipleChoiceInteractionItemsInflatedView( | ||
LayoutInflater.from(parent.context), | ||
parent, | ||
/* attachToParent= */ false | ||
) | ||
if (dataList.map { it.disableAnimation }.any { it }) { | ||
radioButton.multiple_choice_radio_button.setOnCheckedChangeListener { view, _ -> | ||
view.jumpDrawablesToCurrentState() | ||
} | ||
} | ||
radioButton | ||
}, | ||
bindView = { view, viewModel -> | ||
bindingInterface.provideMultipleChoiceInteractionItemsViewModel( | ||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please avoid using synthetic imports--these are deprecated.