Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to limit the number of dropdown items visible at a time on screen in AutoCompleteTextView ?

 
Pritam Shah
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using AutoCompleteTextView and want to limit the number of dropdown items visible at a time on screen. Currently it fills up the screen but can i limit it to say 2 items with a scroll bar for displaying more.
 
Pritam Shah
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it .. simply by calling .setDropDownHeight(int height) method of AutoCompleteTextView
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18091
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, but can anyone point me to a place where I can make that dropdown list out of items that match a datamodel using an alternative filter, as opposed to the default which starts matching at the beginning of each item's string?
 
Pritam Shah
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:Yes, but can anyone point me to a place where I can make that dropdown list out of items that match a datamodel using an alternative filter, as opposed to the default which starts matching at the beginning of each item's string?


Did a simple search and found this , may help you :
http://forum.xda-developers.com/showthread.php?p=5595790
http://sacoskun.blogspot.com/2008/08/autocompletetextview-with-simpleadapter.html
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18091
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pritam Shah wrote:
Tim Holloway wrote:Yes, but can anyone point me to a place where I can make that dropdown list out of items that match a datamodel using an alternative filter, as opposed to the default which starts matching at the beginning of each item's string?


Did a simple search and found this , may help you :
http://forum.xda-developers.com/showthread.php?p=5595790
http://sacoskun.blogspot.com/2008/08/autocompletetextview-with-simpleadapter.html


Unfortunately, I'd already done the same search back in February and got the same result. It didn't help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic