Where does this EditText come from in soft keyboard demo - android

I am building a custom keyboard from the sample code in the SDK I am trying to figure out where the view that contains the typed code comes from.
My goal here is to build a very basic keyboard that fits the specific look and feel of the existing application. I need to remove this view because it is not required.
Please see the attached screen shot for the view.
This application is used in a closed environment so I am not worried about the user selecting a different keyboard. In fact the stock Keyboard is a hazard since the navigation bar is disabled and can result in places that the users can't return from.
Thanks in advance.

Related

AutoCompleteTextView in react native compatible with both iOS and Android

I need to implement AutoCompleteTextView in react native. The problem is that there is no such built-in component. All the modules and libraries available to mimic this feature is not completely similar. The main issue is the suggestions are not appearing over the view(like that of select box/picker). Even if it is then it is not behaving perfectly withKeyboardAvoidingView.
The whole point is it is not working like native AutoCompleteTextView for Android
The other solution is using native UI element. But I want this component for both iOS and Android. Any help would be appreciated.
I want to achieve this option like tag user on the Facebook app
P.S.: Excuse the typos as I am using a mobile device.
After searching a lot for available Libraries and module, I came up with my own implementation of custom AutoCompleteTextView.
I have created a gist for AutoCompleteTextView.
The idea behind:
*There is one input field on the focus of this field keyboard appears.
*When keyboard appears we calculate space from top to input field and from input field till the start of keypad area.
*Will display an absolute positioned scroll view Suggestion area on top or bottom of input field based on the space calculation above.
*When keyboard goes away we hide the suggestion area.
Suggestions are welcome on how to improve this thing.
Here is the android native AutoCompleteTextView component - https://github.com/rajsuvariya/autocompletetextview - its a work in progress.

Detect when the user enters/leaves "Swipe to type" mode in TextInput/EditText (Android)

This is an Android question.
Inside my <TextInput> (ReactNative (which renders an EditText in Android)) when the user types "#" and then they use Androids swipe mode to auto-complete a word, it adds a space between the "#" and the autocompleted word. So what I was doing was, onChange of the text, I replace the space between "#" and the word, however while the user is in swift mode, it is really messing things up. The space comes back and the swift autocomplete messes up to another word.
Is there a way in react-native to listen when the user accepts an autocompletion? I want to then check if the previous two chars are a # (hashtag and space) and if so, then replace it with just # (hashtag without space).
I was thinking the onCommitCompletion- https://developer.android.com/reference/android/widget/TextView.html#onCommitCompletion(android.view.inputmethod.CompletionInfo) - fires after a suggested word is accepted - is this true? If it is this would be perfect and I can submit a PR to react-native to accept this for Android.
Here is a video of what's happening: https://gfycat.com/AdmirableGrizzledIrishsetter
Low quality:
This is happening because you are typing a text via Swipe feature of your keyboard. The Swipe feature automatically adds an extra space before and after the String. There is no way to get rid of it, it's an integrated feature of(some) the keyboard. We have no control over it.
Don't worry, the end user is aware of it and all he has to do is type the whole text rather than using Swipe feature to input his text.
Try disabling AutoComplete inside your TextInput , perhaps like <TextInput autoCorrect={false}/>, I'm not sure.
Also, this isn't the problem with Android phones only, try installing GBoard in an Apple Device and you'll face the same problem.
I worked on a major keyboard for 2 years and I have no idea what you mean by "swift mode". But there is no such feature in the generic keyboard API. It may be a feature of some particular keyboard, but there'd be no way to programmatically turn it off.
What you're describing comes closest to sounding like autospacing. This is not a concept that Android has, it would be a concept of each individual keyboard. And since Android knows nothing about it, it can't turn it off (on many keyboards the user could, but that's it).
You might be able to override it (not turn it off, but force the spaces to disappear) if you were to do some work with either overridding the InputConnection or setting a text watcher in Java and altering the text to be inserted, but neither can be done at the react native level- you'd need to write a custom edit text and link that down to react native via a native component.
I think this would be onCommitCompletion - I'm not sure though I am not able to test yet. I think in this callback I would get the position, and see if there is a leading space, and if so then remove that leading space.

My Website input field on Android causing keyboard to appear and disappear instantly

I am building a small site and ran into a small problem. I am using MixItUp to filter and sort blocks. I am also using a search field to search through the titles of each block and display relevant ones. Everything works fine on all devices and browsers except for Android.
On Android when I tap into the search field my keyboard slides up and then slides away again without giving me a chance to type anything. I tried googling the problem and only relevant thing I could find was this post but I am not sure how to proceed because I have no clue what event listeners would be disrupting the android one.
I am not a very experienced developer (self-taught and still learning lots) so I am not sure how I would go about correcting. My plan right now is to just remove pieces of code until keyboard starts working and then go from there once I identify what is causing it.
The Website is teste3.khalidsleiman.com
I figured out it was a jQuery snippet that I was using to relocate the input field to a different spot on my page depending on window size. Now I only have it set to run that snippet on document load instead of window load and resize. Keyboard is showing up now.

Android application keyboard overlap screen instead of pushing application up in 4.1

I am developing android application using cordova 2.4
Problem is keyboard overlap screen instead pushing application up.
My text field hide behind phone keypad.
Please share if any one know solution for this.
Check into adding this to your activity xml:
android:windowSoftInputMode="adjustResize"
There are some good tutorials out there like this one: http://blog.vogella.com/2010/10/25/android-windowsoftinputmode/
This particular questions has been asked many times as well, see here: Android soft keyboard covers edittext field

Custom or Virtual Keyboard on Android

I wish to create my own custom keyboard on android. It seems the below project on google code project should be able to achieve this. But to extension to this what I also want to add is ability to handle browser events when user is using custom keyboard. ie if user clicks on browser address bar or any text box on the page opened I should be able to determine that as well? Is there a way possible?
http://code.google.com/p/android-misc-widgets/source/checkout
Thanks,
nil
I'm not sure what your question is, but I think you are asking how to create a keyboard that is used when the user clicks on textfields in other apps. Is that right?
If you want to create your own virtual keyboard then you should definitely start by reading the Android IME Docs they are really good and even provide code for a example keyboard that you can download.

Categories

Resources