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

Issue when using with Support Library v7 #9

Closed
mradzinski opened this issue Dec 25, 2013 · 2 comments
Closed

Issue when using with Support Library v7 #9

mradzinski opened this issue Dec 25, 2013 · 2 comments

Comments

@mradzinski
Copy link

Calling MessageBar messageBar = new MessageBar(this); from an activity extending ActionBarActivity (Support Library v7) gives an XML Inflating error:

Binary XML file line #25: Error inflating class android.support.v7.internal.widget.ActionBarView

It seems that by "injecting" the message layout into the activity layout breaks the ActionBarView layout, thus causing the error.

I've tried the same with a regular activity and it works.
Can you give it a try and see if it works on your side?

@SimonVT
Copy link
Owner

SimonVT commented Dec 25, 2013

Don't attach MessageBar until the content view has been set, otherwise it would be behind your content.

@SimonVT SimonVT closed this as completed Dec 25, 2013
@laaptu
Copy link

laaptu commented Jan 17, 2014

For MessageBar to work with Them.AppCompat,following must be included in

    <item name="messageBarContainerStyle">@style/MessageBar.Container</item>
    <item name="messageBarTextStyle">@style/MessageBar.Message</item>
    <item name="messageBarButtonStyle">@style/MessageBar.Button</item>

in themes.xml of

  • values
  • values-v11
  • values-v14,

otherwise ,there will be force close stating to supply layout_width attribute.

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

3 participants