johannilsson / android-actionbar

DEPRECATED Android Action Bar Implementation
1.31k stars 564 forks source link

Failed to inflate, again #48

Closed rekisum closed 12 years ago

rekisum commented 12 years ago

Hi,

sorry to bother you again. I'm still not able to add actionbar-mimic to my project.

01-05 12:36:44.130: E/ActivityThread(4830): android.view.InflateException: Binary XML file line #7: Error inflating class com.markupartist.android.widget.ActionBar

The graphical editor withmy main.xml says. Couldn't resolve resource @style/ActionBar

Looking at your example I think i have to add some styles / themes to my project? Can you please explain what I have to add and where?

Thanks!

johannilsson commented 12 years ago

You need the latest version, which was updated yesterday. You then need to add a Theme to your application or activities you want the actionbar in. See the Manifest in example project for that, the example project is using a two different themes, one AppTheme and one styled for the OtherActivity. Hope this helps.

rekisum commented 12 years ago

no, not really for the Homeactiviy you only defined AppTheme but what can't be found is style/ActionBar? I find something in your styles.xml but it is under OtherTheme I added AppTheme to my project but that didn't help

johannilsson commented 12 years ago

It's defined in themes.xml, here and here for api level 14+.

rekisum commented 12 years ago

arghh!!! it had to do with eclipse didn't found the generated R class maybe I had to import actionbar on top Anyway, I had to delete the import android.R statement now it seems to work sorry, eclipse sucks sometimes ... ;-)

johannilsson commented 12 years ago

I know, glad it works now though :)