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:

https://github.com/commonsguy/cw-android/tree/master/Menus/ActionBar
https://github.com/commonsguy/cw-android/tree/master/Menus/ActionBarBC

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




-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

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

-- 


Sponsored Links


Other Threads

1. several wav sounds in Beta 9 plaies bad

Hi!
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.
Thank's
Vit

--~--~---------~--~----~------------~-------~--~----~

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

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

--~--~---------~--~----~------------~-------~--~----~

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