javiersantos / MaterialStyledDialogs

A library that shows a beautiful and customizable Material-based dialog with header. API 14+ required.
Apache License 2.0
1.17k stars 155 forks source link

Binary XML file line #8: You must supply a layout_height attribute #12

Closed echthard closed 8 years ago

echthard commented 8 years ago

java.lang.RuntimeException: Binary XML file line #8: You must supply a layout_height attribute. at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:492) at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:5755) at android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:5890) at android.widget.LinearLayout$LayoutParams.<init>(LinearLayout.java:1815) at android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:1727) at android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:58) at android.view.LayoutInflater.rInflate(LayoutInflater.java:759) at android.view.LayoutInflater.inflate(LayoutInflater.java:495) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at android.view.LayoutInflater.inflate(LayoutInflater.java:353) at com.github.javiersantos.materialstyleddialogs.MaterialStyledDialog.initStyle(MaterialStyledDialog.java:324) at com.github.javiersantos.materialstyleddialogs.MaterialStyledDialog.build(MaterialStyledDialog.java:268) at com.github.javiersantos.materialstyleddialogs.MaterialStyledDialog.show(MaterialStyledDialog.java:307) at com.sjoprz.activity.Main$2.run(Main.java:197) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4947) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) at dalvik.system.NativeStart.main(Native Method)

javiersantos commented 8 years ago

Could you check if it is working with the latest commit? Thanks!

dependencies {
    compile 'com.github.javiersantos:MaterialStyledDialogs:451e6411da'
}
echthard commented 8 years ago

I can't reproduce it, unfortunately. I see this error coming from a few of my app users. They all have Android API 16.

Can something be build in the library, or do I have to check it in my app and show a normal dialog for API 16?

javiersantos commented 8 years ago

I am almost sure that the latest change should fix the issue. It was an issue affecting to users with a small screen size (less than 470dp x 320dp). Normally, the users with Android 4.1 (API 16) use this screens size.

dependencies {
    compile 'com.github.javiersantos:MaterialStyledDialogs:1.2.2'
}
echthard commented 8 years ago

Ah ok, I will use the update and let you know if I still see the error. Thanks Javier!

javiersantos commented 8 years ago

Great! Thank you for letting me know.

I will close this issue for now. If you see the error again, please open it again :+1: