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

  • Home
  • SEARCH
  • 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 8388963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:35:35+00:00 2026-06-09T18:35:35+00:00

I defined an EditView in Java and set it to accept numbers. Then it

  • 0

I defined an EditView in Java and set it to accept numbers. Then it is accepting numbers only, but I needed float values so changed it to following code:

final EditText eQuantity = new EditText(getActivity());
                eQuantity.setHint("Enter Quantity here");
                eQuantity.setInputType(InputType.TYPE_NUMBER_FLAG_DECIMAL);

But now it is also accepting alphabets along with float values. Am I missing something over here?

  • 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-09T18:35:36+00:00Added an answer on June 9, 2026 at 6:35 pm

    try as:

    eQuantity.setInputType(InputType.TYPE_CLASS_NUMBER | 
                    InputType.TYPE_NUMBER_FLAG_DECIMAL | 
                    InputType.TYPE_NUMBER_FLAG_SIGNED);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ive defined the following and filled it with elements: vector <vector<double> > my_vector; but
I defined a custom routed event with the following constructs (names changed): public class
I defined a custom component and tried to use binding as the following: <ui:composition
I defined a webpage to use iso-8859-1 like the following: <meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
I defined a method for rendering pages: def doRender(handler, tname='index.html',values = {}): temp =
I defined an object which contains properties in code-behind and, want to set the
I defined the following function, where List is a structure. List * LIST_Create() {
Defined a SQL Server, which only user x (in the domain) is allowed to
Defined this way, we can do neither ++x++ nor ++x-- . But on the
I defined multiples rules in one DRL file, how to set order, want to

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.