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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:22:39+00:00 2026-06-01T22:22:39+00:00

I have 3 AutoCompleteTextViews, and I would like to register 2 String[] adapters on

  • 0

I have 3 AutoCompleteTextViews, and I would like to register 2 String[] adapters on them. Currently, I’m doing this:

atw_from.setAdapter(new ArrayAdapter(ctx, android.r.layout.simple_dropdown_item_1line, stages_adapter));

Let’s say my user wants to type “Középmező”, he starts to type “Közé” and he will be offered to choose Középmező, until this, it is pretty simple. But what if the user is too lazy to type accents (and a lot of them are lazy), thus he will type Kozepmezo only, then he won’t get any offer, since there is no Kozepmezo in my String[]. The thing I want is, if he types in “Koze”, he should be offered Középmező, so even if he doesn’t uses accents, he will be always offered the actual word with the accents.

Currently, I have a pretty silly solution, I have a String[] with double the size of the original [], the first half contains the words with accents, the second contains the deaccented versions. So now, if he types Közé, he will be offered Középmező, and if he types Koze, he will be offered Kozepmezo. It works because the server can process both versions, but it just looks silly, and I want to solve it.

From what I understand, I should make a full custom adapter. Is that the best approach, or is there any solution included in the SDK? If I should make the custom adapter, could anyone point me in the right direction, on how to do that? 🙂

EDIT: added my own answer, should work for everyone, cheers for the other answer, which directed me to the good direction!

  • 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-01T22:22:41+00:00Added an answer on June 1, 2026 at 10:22 pm

    Okey, after a lot of pain in the arse dealing with this, here’s the thing I did at the end. This is NOT a good practise at all, and I may do it wrong, but at least it is working perfectly now.

    Simply ctrl+c, ctrl+v the source code of BaseAdapter, and ctrl+c, ctrl+v the source code of ArrayAdapter. Now look at the private inner class, ArrayFilter, especially the performFiltering method. Modify(not override!) it, as much as you want, in my case, I added a lot of .replace(“x”,”y”) thingies, for the deaccenting part.

    Whatever else I tried, either produced unpredictable force closes(a lot, and completely random ones), or I just couldnt do it, since too much methods/variables are private, instead of protected. I must say, Google should revisit theese codes…

    Note: you don’t really need to ctrl+c ctrl+v the BaseAdapter codes, since it is a public abstract class, but hey, it is not that much of a code, and this way everything is there, clearly visible for you.

    cheers

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

Sidebar

Related Questions

have an an array String classname[]={'a','b','c','d'}; ArrayAdapter<CharSequence> adapterClasses = new ArrayAdapter<CharSequence>( getApplicationContext(), R.layout.spinner_item_class, R.id.spinnerclasstxt,
I've have a Vector like this in my app: Vector<Firm> firmVector= new Vector<Firm>(); As
I have set the IME options for my AutoCompleteTextView object like this: inputSearch.setImeOptions(EditorInfo.IME_ACTION_NEXT); and
I would like to have a Text plus image button in a row. if
I have an ArrayAdapter (myAdapter) attached to an AutoCompleteTextView (textView) component. Once the user
Have a look at this picture alt text http://www.abbeylegal.com/downloads/2009-04-01/web%20part%20top%20line.jpg Does anyone know what css
Have some code: using (var ctx = new testDataContext()) { var options = new
I have one autocompleteTextview, where i am loading a string array in to it..
I have an autocomplete which does a query to DB....when doing a click on
Have a xml string, goal is to replace an xml element value to a

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.