-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* nit * UI hi-fi for text,number,and fraction input views * UI hi-fi for text,number,and fraction input views * UI hi-fi for text,number,and fraction input views nit * nit * nit * test cases update * accent color * input type in fraction input type * input type in fraction input type * Merge branches 'develop' and 'hi-fi-input-interaction-views' of https://github.com/oppia/oppia-android into hi-fi-input-interaction-views # Conflicts: # app/src/main/res/layout/text_input_interaction_item.xml * text color in input type views * changed inputtype in edit text * margin updated in input views * nit * keyboardhelper to handle softinoutkeyboard * Edit text focus removed. 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 * as per review suggestion added binding.stateRecyclerView.smoothScrollToPosition(0) in processEphemeralStateResult * nit * Fix-406 * nit changes and keybord helper class renamed. * nit * kdoc for keyboardhelper.nit changes * kdoc for keyboardhelper * nit * nit * nit * nit * nit * validation in fraction input * nit * nit * nit * errorcode enum * errorcode enum * nit * nit * nit * nit * error text on Fraction input * error text on Fraction input * nit * nit * updated FractionParsingErrors Enum with string resources, added getPendingAnswerError in InteractionAnswerHandler,in error text of fraction set minimum height 32dp and text size 12sp ,color code updated,and othere nit changes * nit * nit * nit * Merge conflict issue fix Merge branches 'develop' and 'hi-fi-input-interaction-views-validation' of https://github.com/oppia/oppia-android into hi-fi-input-interaction-views-validation # Conflicts: # app/src/main/java/org/oppia/app/parser/StringToFractionParser.kt # app/src/main/java/org/oppia/app/player/state/itemviewmodel/ContinueInteractionViewModel.kt # app/src/main/java/org/oppia/app/player/state/itemviewmodel/FractionInteractionViewModel.kt # app/src/main/java/org/oppia/app/player/state/itemviewmodel/InteractionViewModelModule.kt # app/src/main/java/org/oppia/app/player/state/itemviewmodel/NumericInputViewModel.kt # app/src/main/java/org/oppia/app/player/state/itemviewmodel/TextInputViewModel.kt # app/src/main/res/values/strings.xml * not showing error on fiest - symbol in fraction input, new method for submit button click * not showing error on fiest - symbol in fraction input, new method for submit button click * nit * partial answer removed error message display by regex for partial values * nit import optimisation changes reverted * nit import optimisation changes reverted * nit import optimisation changes reverted * carsh fix in EditTextBindingAdapters * on submit button displays error for partial input and divided by 0 * instance check * moved FractionParsingError to StringToFractionParser, In InteractionAnswerHandler added isExplicitErrorCheckRequired, and updated existing with getPendingAnswerErrorOnSubmit and other changes required for the above. * color names updated casing * Introduced disparity between the patterns used to validate vs the ones we use to parse. Suggested by ben. * test cases for error messages. * nit * partial mixed fraction issue fix * nit * nit * nit * added few testcases * nit changes. * parseFunction introduced and the helper is used for both for parsing and validation * getter and setter for PendingAnswerError in FractionInteractionViewModel, removed valid string resource and returns string "valid" inside enum, setPendingAnswerError,hasPendingAnswerError flags in InteractionAnswerHandler, and other nit * removed digit filter in test activity nit * removed digit filter in test activity nit * added new method onAnswerRealTimeError in InteractionAnswerHandler * added new method onAnswerRealTimeError in InteractionAnswerHandler * state fragment is added as parameter to FractionInteractionViewModel * submit button active/inactive on realtime error implementation on StateFragmentPresenter * nit changes * nit changes, InputInteractionViewTestActivity updated with new realtime error implemenatations and submit button enable and disable. * submit button issue fix. * interactionVieewModelModule code fix for on continue button click for multiplechoice issue/crash. * nit * setting error on submit is moved to stateFragmentPresenter * nit * InteractionAnswerErrorReceiver * 3rd approach * fraction input validation final approach * nit * nit * nit * nit * New fraction submit time error "None of the numbers of the fraction should be larger than 7 digits." * test-case to check long number, nit changes ,kDoc * nit
- Loading branch information
1 parent
e3e5040
commit 14ed668
Showing
25 changed files
with
430 additions
and
64 deletions.
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
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
11 changes: 11 additions & 0 deletions
11
app/src/main/java/org/oppia/app/databinding/EditTextBindingAdapters.kt
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.oppia.app.databinding | ||
|
||
import android.text.TextWatcher | ||
import android.widget.EditText | ||
import androidx.databinding.BindingAdapter | ||
|
||
/** Binding adapter for setting a [TextWatcher] as a change listener for an [EditText]. */ | ||
@BindingAdapter("app:textChangedListener") | ||
fun bindTextWatcher(editText: EditText, textWatcher: TextWatcher) { | ||
editText.addTextChangedListener(textWatcher) | ||
} |
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
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
15 changes: 15 additions & 0 deletions
15
...src/main/java/org/oppia/app/player/state/answerhandling/InteractionAnswerErrorReceiver.kt
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.oppia.app.player.state.answerhandling | ||
|
||
/** | ||
* A handler for interaction answer's error receiving to update submit button. | ||
* Handlers can either require an additional user action before the submit button UI can be updated. | ||
*/ | ||
interface InteractionAnswerErrorReceiver { | ||
|
||
/** | ||
* Called when an error was detected upon answer submission. Implementations are recommended to prevent further answer | ||
* submission until the pending answer itself changes. The interaction is responsible for displaying the error provided | ||
* here, not the implementation. | ||
*/ | ||
fun onPendingAnswerError(pendingAnswerError: String?) {} | ||
} |
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.