-
Notifications
You must be signed in to change notification settings - Fork 528
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
- Loading branch information
1 parent
fdef5b9
commit 7704741
Showing
10 changed files
with
140 additions
and
59 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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.oppia.app.utility | ||
|
||
import android.content.Context | ||
import android.view.View | ||
import android.view.inputmethod.InputMethodManager | ||
|
||
/** KeyboardHelper helps to change the visibility of softinputkeybord. */ | ||
class KeyboardHelper { | ||
companion object { | ||
/** | ||
* This method hides softinputkeybord | ||
* @param view is the input view | ||
* @param context context of the activity | ||
*/ | ||
fun hideSoftKeyboard(view: View, context: Context) { | ||
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager | ||
imm.hideSoftInputFromWindow(view.windowToken, InputMethodManager.HIDE_IMPLICIT_ONLY) | ||
} | ||
|
||
/** | ||
* This method shows softinputkeybord | ||
* @param view is the input view | ||
* @param context context of the activity | ||
*/ | ||
fun showSoftKeyboard(view: View, context: Context) { | ||
if (view.requestFocus()) { | ||
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager | ||
imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT) | ||
} | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Fri Sep 13 18:15:04 IST 2019 | ||
#Tue Nov 19 15:14:08 IST 2019 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip |