Win a copy of Murach's Java Programming this week in the Beginning Java 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 ?  RSS feed

 
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
Posts: 18635
70
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
Posts: 18635
70
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.
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!