ActionBar.setCustomView doesn't seem to work

by Tom » Tue, 15 Mar 2011 17:30:42 GMT

Sponsored Links
 I'm attempting to use the 'setCustomView' method of the ActionBar, but
am unable to load my (very basic) layout. I took a look at the
Honeycomb-Gallery sample, which also references
ActionBar.setCustomView. After removing the code which adds the tabs
to the ActionBar and failing to see the "Hello Action Bar" text from
that layout file, I'm unconvinced the sample is correct. Is there
anything I might be missing here?


Re: ActionBar.setCustomView doesn't seem to work

by Mark Murphy » Tue, 15 Mar 2011 19:51:04 GMT

 Well, I haven't played with action bar tabs yet, but here are two
sample projects that use custom views in the action bar:

The second one is a bit more complicated but is backwards-compatible
to non-Honeycomb versions of Android.

Mark Murphy (a Commons Guy)  |  | 

Warescription: Three Android Books, Plus Updates, One Low Price!


Sponsored Links

Other Threads

1. several wav sounds in Beta 9 plaies bad

Can anybody say, why several wav sounds in Beta 9 plaies bad?
One or two lpays good, but next plays half path or not plays?
In m5 all wasgood.


2. connecting to "" via "" in Beta 9

Could anybody use Socket() for connecting to "" via
"" in Beta 9?
It worked in m5, but doesn't work in in Beta 9.


3. Phone states?

4. ListActivity getSelectedItemId() and AlertDialog()

5. Quirky behavior when rotating screen in API Demos sample, Progress dialog

6. Proxy - 0.9 Beta SDK

7. Cannot find symbol class android.view.MenuItem