Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Must use Theme.ActionBar in ActivityManifest.xml #28

Open
LorneLaliberte opened this issue May 30, 2011 · 2 comments
Open

Must use Theme.ActionBar in ActivityManifest.xml #28

LorneLaliberte opened this issue May 30, 2011 · 2 comments

Comments

@LorneLaliberte
Copy link

A heads up after updating the mimic-native-api branch on 2011-05-30:

If you get an error (e.g. "You must supply a layout_width attribute.") where the actionbar.xml is inflated, check your ActivityManifest.xml to make sure the activity in question is using the ActionBar style as its theme.

For example, if you have activity using this:

android:theme="@android:style/Theme.NoTitleBar"

...you will need to change it to this:

android:theme="@style/Theme.ActionBar"

You can remove the title bar with the "android:windowNoTitle" style item in any custom themes you set up, as is done for the OtherTheme in the example app.

It might be worth mentioning this in the readme or as a comment somewhere. :)

@johannilsson
Copy link
Owner

You're right I should have communicated that better so sorry for the problem it caused. It's still very much a WIP and it might change again. Currently the best way to track the changes is to look at the example app and follow the commits I'm trying the best I can to describe the changes there I understand that this is not ideal though.

On the changes, I don't like to depend on a theme for every single component that's included in a project but this was the only way I could come up with that allows for a flexible way to style the action bar which I believe is something many will appreciate. As you noticed it's possible to modify an existing theme as demonstrated in the OtherActivity and remove the dependency on the Theme.ActionBar.

@LorneLaliberte
Copy link
Author

Yep, perusing the commits has definitely been helpful. In this case I didn't spot the manifest change, but I don't blame you...as you said it's still a work in progress, and besides, this library is saving me so much time from building my own action bar that I can afford to lose some time here and there. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants