Add comma in numeric keyboard in xamarin.forms for android - keyboard

I need to use both comma and dot in the numeric keyboard in android in xamarin.forms.
I am testing on Samsung S7.
when defining the
Keyboard = Keyboard.Numeric
in xamarin.forms I can only see dot with the numbers.
I tried custom renderer with:
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
{
base.OnElementChanged(e);
InputTypes its = InputTypes.ClassNumber | InputTypes.NumberFlagSigned | InputTypes.NumberFlagDecimal;
Control.SetRawInputType(its);
}
but I see the dot with the - sign, no comma
Any ideas ?

try phone number as input type. it is the only numeric keyboard type out of the box that offers point and comma.

I need to use both comma and dot in the numeric keyboard in android in xamarin.forms.
As far as I know, it's not possible to add comma to the default numberic keyboard.
And, the style of software keyboard is not always the same depending on different android system.
For example, I made a demo from your codes and tested it on Google Emulator(Android 6.0) the keyboard shows like below:
As you can see, there is a comma on the keyboard.
So the only solution I can think of that fullfills your requirement is to create a custom keyboard. For this solution, you can refer to this case.

Related

Unicode charecters in android stuido

I am designing a calculator in android and I want to make a button for math pow operation. but instead of X^y, I want the button to show "y" as a propper superscript. also, a special sign for division operation rather than "/". is there a way to do this.
it would best if it was possible to write a line in Values/String.xml file. I can write the special symbol for the registered sign with this code "\u00AE" but codes like division doesn't work this way.
Here, รท, Copy paste this symbol, or alternatively you can use an image.
And as for the power thing. You've control over the whole UI, don't take it as a WordPad, why don't you use TextView and position it dynamically so that it looks like it is in the superscript? Like scaling it down, and translating a bit up in the y direction.

How to set 2D Text position same to all devices in Spark AR

I have some problems when I try to test my filter to 2 Devices, iPhone and Android. when I test on the iPhone, the position of text contains date and time is good in the near bottom left like this . But when I test on an Android device, the text position is too far up like this .
Is there a way to fix the position of 2D text for all devices?
here is my project
Your magic button is pinning to bottom.
Maybe you also need to use left pinning.
Also switch to resizableWindow option, instead of an actual device, this way you can check any possible aspect ratios! (top left corner of a screenshot)

How can I change keyboard style to Numeric in Winrt?

I was using InputScope in Windows Phone for open numeric Keyboard and I need its equaivalent in WinRT, Windows8.
How can I do it?
Thanks.
InputScope is still available in WinRT-XAML on the TextBox control, in the same way it is on Windows Phone development.
Add a TextBox to a page and you'll find the property under Common grouping.

how to change the input mode of the mobile using j2me (MIDP2.0)?

I am working in j2me midp2.0 environment. Now, I want to draw String (custom item) based on user key pressed event. Here, my problem is, some phones default input mode is numeric and I can't be able to draw Strings. How to change this input mode to Strings and vice versa?
I think you manually get the key values and change it. On key press event you find which key pressed based on that you write a login to get numeric values or character, etc.

Restrict Text Box to only accept 10 digit number

I have a Text Box that is a System::String^, I need to confirm that this only accepts 10 digits numbers and no letters, symbols, etc. How would I implement this in C++ visual studio? Do I need to convert the contents to a std::string first?
Assuming this is a .NET winforms text box (since your snippet is C++/CLI), you want to set the "MaxLength" property. (Something like TextBox^ tb = gcnew TextBox(); tb->MaxLength = 10.)
For the numbers-only part, you want to assign a delegate to the KeyDown and KeyPress events to make sure the entered character is a number. Sample Code is here: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keypress(v=VS.71).aspx

Resources