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 6892745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:34:24+00:00 2026-05-27T06:34:24+00:00

In my application I created auto complete field by using the below code sugarVariety

  • 0

In my application I created auto complete field by using the below code

sugarVariety =  (AutoCompleteTextView)findViewById(R.id.autocomplete_sugarVariety);          
     String[] VARIETY = new String[]{ "118", "119",  "120", "121", "269",    "270",   "271",   "272",  "273",   "346",  "347",   "348", "349",    "350","351",   "352",   "353",    "354",   "355",  "356",  "357", "358",
                "359",  "360", "361", "345", "117",    "266",    "362",    "363",   "364",   "365",   "366",   "367",   "368",  "369",   "370",   "371",  "372",  "373",   "374",   "375",  "376",  "377",
                "378",    "379",    "380",   "239",    "240",   "241",   "242",   "114",  "230", "231",  "101",   "102",  "103", "104",  "108", "111",  "112",  "201",  "202",  "204",  "206",   "207",
                 "208",    "210",   "217",   "218",   "220",  "221",   "226",   "227",  "250", "301",  "302","113", "228",  "0", "246", "999", "205",   "251", "243","268","329", "115", "116", "274"};
     ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line, VARIETY);
     sugarVariety.setAdapter(adapter);  

And in my layout I defined autocomplete textview as

 <AutoCompleteTextView android:id="@+id/autocomplete_sugarVariety"
    android:layout_width="wrap_content" android:inputType="number"
    android:layout_height="42px"
    android:layout_marginLeft="5dp"/>

The problem is if I give inputType=”number” I am not getting AutoComplete list of numbers for the array if I remove it then only I am getting but in my case I want to show the keyboard with numbers only and also I need auto complete can any one tell me how can I get this…

  • 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-05-27T06:34:25+00:00Added an answer on May 27, 2026 at 6:34 am

    Guy, you’re doing something strange.

    In your case you can cast all to String. If necessary get number after, you cast to INT or LONG again.
    (JUMP rs)

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

Sidebar

Related Questions

I created a GridView in an ASP.NET application and used the Auto Format tool
After I uploaded my application created using cakephp, I found out that I had
The registered accounts in my web application (Created using struts2) gets a separate site
I'm debugging an intermittent problem in which an application (created using C++ in Visual
I am converting an application I created using webforms to the asp.net mvc framework
I have created a blog application using Ruby on Rails and have just added
In a WPF Application using XAML, I created a stackpanel(width 1030) and I have
This is a JavaEE6 application using Hibernate and PostgreSQL. Users are created in the
There are 2 forms. Form2 isn't auto-created. Form2:=TForm2.Create(Application); Form2.Show; If to do Sleep(10000); inside
I have a Winforms application created in Visual Studio 2005 Pro, it connects 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.