Search widget within action bar

specci48

Well-Known Member
Licensed User
Longtime User
Since more and more devices are running android os 3.0 or above I'd like to support the action bar whereever it is possible.

I know there are already a custom library and a custom class available :sign0098: but as far as i can see both implementations "only" provide the functions of normal menu buttons.

I am looking for an implementation of the search widget within action bar (see attachment). Is this already possible with b4a? Or do I (we) need a new library for this - which to create is far beyond my knowledge... :sign0148:


specci48
 

Attachments

  • SearchWithActionBar.jpg
    SearchWithActionBar.jpg
    4.2 KB · Views: 253

Informatix

Expert
Licensed User
Longtime User
Since more and more devices are running android os 3.0 or above I'd like to support the action bar whereever it is possible.

I know there are already a custom library and a custom class available :sign0098: but as far as i can see both implementations "only" provide the functions of normal menu buttons.

I am looking for an implementation of the search widget within action bar (see attachment). Is this already possible with b4a? Or do I (we) need a new library for this - which to create is far beyond my knowledge... :sign0148:

The ActionBar class lets you put what you want in its panel. It handles only buttons, that's right, but you can handle yourself everything else.
 
Upvote 0

specci48

Well-Known Member
Licensed User
Longtime User
The ActionBar class lets you put what you want in its panel. It handles only buttons, that's right, but you can handle yourself everything else.
Yes, I already thought about that, but I wanted to be sure not overseeing a "better" solution.

Your class is a great help to provide action bar handling for devices not really supporting it. :cool:

Maybe I should put a wish on Erel's todo-list for a better build-in support of the action bar (like the menu) because as this is a really key feature of android 3.0 and above I think a direct support is necessary instead of implementing all those features manually with an own class.


specci48
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
Yes, I already thought about that, but I wanted to be sure not overseeing a "better" solution.

Your class is a great help to provide action bar handling for devices not really supporting it. :cool:

Maybe I should put a wish on Erel's todo-list for a better build-in support of the action bar (like the menu) because as this is a really key feature of android 3.0 and above I think a direct support is necessary instead of implementing all those features manually with an own class.

I prefer an approach that provides me a consistent display on every device, with every version, but I understand your point of view.
With the "official" action bar, you'll still have to handle almost everything for a search field, because the one you see on the Google site or in apps is a SearchView, a specific view not available with B4A for now.
 
Upvote 0
Top