Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7979849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:53:19+00:00 2026-06-04T09:53:19+00:00

I have an edittext which is created programmatically (so not in xml) and I

  • 0

I have an edittext which is created programmatically (so not in xml) and I want to launch a numeric keyboard when user presses it. The problem is that I want this keyboard also to contain the decimal separator (.).

I tried many things but nothing seems to work

final EditText input = new EditText(this);

input.setKeyListener(new DigitsKeyListener()); // this gives numeric without decimal separator
input.setInputType(InputType.TYPE_CLASS_NUMBER); // this gives numeric without decimal separator
input.setInputType(InputType.TYPE_CLASS_PHONE);//this gives phone keyboard with all the digits and decimal separator in the second page. It is not exactly what I want

I know that there is a way to implement custom keyboard:

http://android-developers.blogspot.com/2009/04/creating-input-method.html

http://developer.android.com/resources/samples/SoftKeyboard/index.html

but it seems quite a pain and I am first looking for a quicker alternative.

All I want is one of the following:
1. Launch numeric keyboard that contains decimal separator
2. Launch standard keyboard, but set in the numeric “page”
Is something of the above possible? Thank you in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:53:21+00:00Added an answer on June 4, 2026 at 9:53 am

    There is no keyboard for what you are describing, at least not one that you can get as a normal input type. Even if you made a custom keyboard, that wouldn’t be a good way of handling this because the user would have to switch keyboards every time they wanted to use your app.

    Also, you can’t explicitly open the text keyboard “on the number page” because not all Android keyboards even have a separate number page. This is highly customized on each device.

    My first suggestion would be to use the normal text keyboard, and let the user decide which keyboard suits the best.

    My second suggestion would be to build a number pad on the screen using buttons/views for the specific keys you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have declared an EditText programmatically (i.e. not in XML), and want to apply
I have list of products which have EditText in TableLayout . I want Keyboard
I have a EditText which I am presenting as disabled so that user cannot
Currently I have an edittext field that when the user presses enter it does
I have an EditText which takes a String from the user and a searchButton.
I have a edittext in which some text are selected . I want to
I have an edittext, and a textwatcher that watches if SPACE arrived or not.
I have a EditText which I disabled the keyboard from popping up. And a
I have a edittext which the user enters some text into Once they press
I have an EditText view which will allow the user to edit an address

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.