Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 10
Registered: ‎04-27-2012
My Device: 9900
My Carrier: vodafone
Accepted Solution

Blackberry: KeywordFilterField Search UI Improvement

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.

Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Blackberry: KeywordFilterField Search UI Improvement

Is this field is the first element in the screen....

 

 

Contributor
Posts: 10
Registered: ‎04-27-2012
My Device: 9900
My Carrier: vodafone

Re: Blackberry: KeywordFilterField Search UI Improvement

No it isn't, there are other components on the screen such as the button
Developer
Posts: 141
Registered: ‎07-13-2011
My Device: BB Bold
My Carrier: Vodafone

Re: Blackberry: KeywordFilterField Search UI Improvement

In the default address book application the search is always on the top, which is not true in ur case.

 

If you make this as a top field, that i may have a solution for u

Contributor
Posts: 10
Registered: ‎04-27-2012
My Device: 9900
My Carrier: vodafone

Re: Blackberry: KeywordFilterField Search UI Improvement

Are you saying it is impossible to do this with other controls on the screen? and please do say your solution. Thanks.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Blackberry: KeywordFilterField Search UI Improvement

I don't use this Field because I wrote a similar Field a long time ago which I use instead.  Having looked at the Field however, the principles are the same - a search input Field and a ListField that displays the matching arguments.  So I think you can use the same approach that I use in my own equivalent Field.

 

Assuming you have a MainScreen, then put an EditField in your title or banner area

setTitle(...)

or

setBanner(....)

 

Add the KeywordFilter field to the normal scrolling part of the Screen.

 

Then use setKeywordField to use the Field you have put in the title/banner area as the input to the Filter.  This will mean that the keyword will stay on top while the FIlter List is scrolled.

 

If you have a more complex requirement where the filtering Field is part way down the screen, we can work similar magic but it is a little more complicated.

 

You might find the following useful if you are not familiar with MainScreen.

http://supportforums.blackberry.com/t5/Java-Development/MainScreen-explained/ta-p/606644

Contributor
Posts: 10
Registered: ‎04-27-2012
My Device: 9900
My Carrier: vodafone

Re: Blackberry: KeywordFilterField Search UI Improvement

The article is exactly what I want. Thanks peter_strange