Blackberry AutoCompleteField with first and last name
I'm trying to create an autocomplete field in a blackberry app that uses both the first name and the last name of a record to check for prefix matches. My BasicFilteredList is an array of record objects, each having a first name and a last name. I considered adding two instances of the same object array, with mapping String arrays of first and last names like so:
filterList.addDataSet(1, firstNames, recordsArray, "records2", BasicFilteredList.COMPARISON_IGNORE_CASE);
filterList.addDataSet(2, lastNames, recordsArray, "records2", BasicFilteredList.COMPARISON_IGNORE_CASE);
This however retrieves the same object twice. if the person's first and last name begin with the same user-entered prefix in the autocomplete field. In short, I am trying to mimic the existing blackberry contacts autocomplete functionality, but with my own 开发者_高级运维custom records. Any help would be much appreciated. Thank you.
精彩评论