Inputbox NumericKey and Password char Firemonkey Delphi xe5 - android

i want use numericKeypad and Password input on "inputbox" Function.
android and ios. (Firemonkey Delphi XE5)
eg. str:=inputbox('pass','pass','pass')
but only show on device multiple keyboard layout.
Please solution.
Thanks...

InputBox doesn't offer a choice of which keyboard you use, whether it's the FMX.Dialogs.InputBox or VCL.Dialogs.InputBox version. It's a standardized function that uses the standard keyboard layout.
If you want different behavior, use a different method to get the input. Design your own form that supplies the specialized behavior and show it to get the input from the user.

Related

Android use smileys keyboard

I am working on an Android chatting application. I need to show, a smileys or emoji's keyboard, like that of 'Whats App'. Is there any such default keyboard for Android? If yes, how do I implement it?
This largely depends on what the user currently has installed. I use SwiftKey on my phone so I have the ability to use the Emoji's. If you are willing to put in the effort to create your own Emoji keyboard then toobsco42 has a great basic explanation of the process as well as a link to a repo that you can use.
i would say start by getting the font with all the unicode charset for your application and render them in an layout invoked on the button in your input field.
One of the website to create custom fonts : icomoon.io

Numeric keyboard as default, but allow text

I'm currently developing an application targeted at android and desktop devices using apache cordova and HTML5.
In order to get the numeric keyboard to pop up I've used input type="number", which works fine.
However, the input field should also accept strings. The current functionality of type=number is that the ui seems to allow for strings to be entered, but the value property of the element is not changed if the input is invalid (e.g not numberic).
Is there a way of getting the numberic keyboard on mobile devices, while still being able to enter text?
My inital tries consisted of capturing the keydown event and manually setting the this.value property. I've tried this using jQuerys .val() and of course the more 'native' approach element.val += char. None of which work. UI is updated, but the change is not reflected in the model.
EDIT
For the next guy trying to achieve this.
1) The HTML solution.
As #LuudJacobs mentions in the comments below; There's currently no way to decide which keyboard is shown except for defining the type-attribute. Though some devices have a button to go back to alphabet keyboard, its not the case for every device. And can not be used reliably.
2) Writing a phonegap/cordova plugin.
It is possible to write a plugin to show and hide the keyboard at will. But, as far as I could find, there is currently no way of programmatically telling it to default to the symbols keyboard. Thus the functionality achieved is similar to using type=number and type=text in the HTML. Another problem with this approach is the diversity of keyboard for android devices, where even users themselves can install their custom keyboard. The functionality of the keyboard can are therefore unknown. What works on one device, may not work on the next.
3) JS/HTML/Canvas solution
Finally... A feasible solution. I suggest taking a look at this walkthrough as it shows an easy way to creating the keyboard using just html and js. Another option would be to use a canvas, and draw the keyboard yourself, but I would imagine that this is more error prone and harder to do.
As explained in the HTML5 spec you can not have anything but valid floats in a input type="number". So You can not. On a sidenote: how would users enter text when they'd only have a numeric keyboard?

Changing the Keyboard for Specific App on Android

I am developing a "Nepali Dictionary Android App" using Cordova. Using jQuery I have been able to map the keyboard character to Devnagari. For example If you pressed the 'k' from keyboard 'क' will be displayed in editable text inputs. Now , I am trying to change the keyboard characters so that the users could see Nepali characters in keyboard.
I don't know If it is possible or not, but I think it should be. I am not a java programmer and using cordova api to build the android applications. I am also planning to create MultiKeyboard Phonegap / Cordova Plugin for android (in future ) if It is possible.
My Question is :
How can I change the android keyboard characters for some specific apps ?
WHAT HAVE I TRIED
I have not started coding for this because I don't know if it is possible or not. Please show me the right way.
Thanks.
You could change char value with different value if the given input values will not be used. What i mean is if 'k' will never be used you could catch that input in for example
var tempChar;
variable and swap it's value from a HashMap, but I don't know if you can change the layout of keyboard using PhoneGap only. If you can't do, you can draw your own keyboard using jQuery Mobile if there is way to disable Android keyboard for your app.

Create a custom InputType

Is it possible to create a custom InputType for the Android keyboard to use?
I want to make it so the keyboard shows the number pad first and then after a user types in a float or an integer followed by a space I want it to switch to the default alpha keyboard.
I tried using a TextWatcher instance, but this seems buggy on anything above 2.0 (sometimes it would lose a character, this doesn't happen on 1.6 or below).
Any ideas?
Thanks for reading.
Yes, it is possible.
I haven't done it myself, but the evidence is in apps that serve as input types. Look up apps such as Swype and 8pen; they serve as different input types, with Swype building on a keyboard similar to the default and 8pen providing a different input UI altogether.

Global keyboard input listener on Android

I was wondering if it is possible to intercept keyboard input on a global level on Android. For example a user types in text into an edittext (does not matter which application) I would like to access said text to check for certain words. Is this even possible with Android's security model (yes I am aware this kind of feature could be used for various wrong things too).
Thanks,
b3n
Not possible. Thst's a security hole. You're welcome to modify the android firmware though

Categories

Resources