0

I'm having a UI problem with the Search functionality of the keywordfilterfield. I want to set the search bar of the keywordfilterfield to stay freeze on the screen so that if users scroll down in a keywordfilterfield (with large data), the search bar would still be displayed. An example of this functionality been used is in the contacts (AddressBook Screen) of a blackberry phone whereby u scroll down and the search bar still stays fixed at the top position even when you scroll down.

Can anyone give me a code or method that freezes the search bar of the keywordfilterfield.

Akinslove
  • 109
  • 1
  • 7
  • Are you using database values to filter data?I myself have been trying to do this from a long time but hard luck. – learning_fly May 16 '12 at 17:27
  • Yes I am and I was thinking this is more of a UI settings (just freezing a section of a control shouldn't be that difficult on first assumption until now...lol) – Akinslove May 17 '12 at 09:24
  • How did you go about using database values instead of array elements in filtering.Would appreciate if you could just guide me on that. – learning_fly May 17 '12 at 09:30
  • Why not create a thread and i will answer that if you send me a link learning_fly. – Akinslove May 18 '12 at 10:33

1 Answers1

0

You can easily stick your KeywordFilterField's search field by using it as the screen's title:

yourScreen.setTitle(yourKeywordFilterField.getKeywordField());

If you use the title section for other information, try to wrap the list field in a VerticalFieldManager with style Manager.VERTICAL_SCROLL | Field.USE_ALL_HEIGHT.

Or, for full control, you may write a custom Manager that first paints the keyword field with its preferred height and afterwards a VerticalFieldManager with the rest of the available height containing the list field. But this is harder to implement due to correct focus handling and layouting. Here some links to start writing custom managers:

How to - Create a custom layout manager for a screen

Creating Custom Fields and Managers is Easier than You Think!

DEAD10CC
  • 910
  • 1
  • 6
  • 20