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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:51:38+00:00 2026-05-25T23:51:38+00:00

I have a MultiAutoCompleteTextView. When i enter Sal it suggest Salami , but when

  • 0

I have a MultiAutoCompleteTextView. When i enter “Sal” it suggest “Salami” , but when i press it in the box stands “Salami, “.

How could i prefent that?

My Code:

void addAutoSuggest ()

{
     myDB = this.openOrCreateDatabase(MY_DB_NAME, MODE_PRIVATE, null);
     ArrayList<String> list = new ArrayList<String>();
     Cursor cursor = this.myDB.query(MY_DB_TABLE, new String[] {"name"},null,null,null,null,null,null);
      if (cursor.moveToFirst()) {
         do {
             String str= cursor.getString(0);
            list.add(str); 
            } 
         while (cursor.moveToNext());
      }
      if (cursor != null && !cursor.isClosed()) {
         cursor.close();
      }
      if (list!=null)
          {
              name.setAdapter( new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, list));
              name.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer());
          }
      }
  • 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-25T23:51:38+00:00Added an answer on May 25, 2026 at 11:51 pm

    In MultiAutoCompleteTextView,it would always need separator so i think,you can’t get rid of it. But you can use space as seperator instead of comma and then you can trim your final string for further use. You can find solution here –

    How to replace the comma with a space when I use the "MultiAutoCompleteTextView"

    Or if you want to continue using ‘,’ as separator,then you would have to manually remove last comma from a final string you get in MultiAutoCompleteTextView.

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

Sidebar

Related Questions

I have strange behavior with android.R.layout.simple_dropdown_item_1line while using MultiAutoCompleteTextView . The code I use
Have a fun issue with sharepoint calendar view filtering. That code works fine: SPSecurity.RunWithElevatedPrivileges(delegate()
I have a MultiAutoCompleteTextView which lets you enter in multiple entries and shows you
Have a text box which get data for price. If someone enter something like
have this code: void set(list<Person*>* listP){ Person timmy = Person(10); listP->push_back(&timmy); } int main()
I have set adapter to the MultiAutoCompleteTextView in my android application. ArrayAdapter<String> adapter =
I have complaint from my user: When input text in MultiAutoCompleteTextView control -> color
I actually had a multiautocompletetextview, where i call host after 3 characters to have
Have following listener for keyboard ArrowDown event(it's key code is 40 ): window.onload =
Have converted devise new session from erb to Haml but doens't work, this is

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.