soarcn / BottomSheet

One way to present a set of actions to a user is with bottom sheets, a sheet of paper that slides up from the bottom edge of the screen. Bottom sheets offer flexibility in the display of clear and simple actions that do not need explanation.
http://soarcn.github.io/BottomSheet
2.22k stars 409 forks source link

error from inflating the sheet #52

Closed jjhesk closed 9 years ago

jjhesk commented 9 years ago
04-28 12:13:39.496    1697-1697/com.hb.editoral E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.hb.editoral, PID: 1697
    android.view.InflateException: Binary XML file line #39: Error inflating class android.widget.GridView
            at android.view.LayoutInflater.createView(LayoutInflater.java:633)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
            at android.view.View.inflate(View.java:18524)
            at com.cocosw.bottomsheet.BottomSheet.init(BottomSheet.java:265)
            at com.cocosw.bottomsheet.BottomSheet.onCreate(BottomSheet.java:523)
            at android.app.Dialog.dispatchOnCreate(Dialog.java:373)
            at android.app.Dialog.show(Dialog.java:274)
            at com.cocosw.bottomsheet.BottomSheet$Builder.show(BottomSheet.java:831)
            at com.hkm.editorial.ArticlePage$2.onClick(ArticlePage.java:89)
            at android.view.View.performClick(View.java:4785)
            at android.view.View$PerformClick.run(View.java:19858)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:155)
            at android.app.ActivityThread.main(ActivityThread.java:5696)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
     Caused by: java.lang.reflect.InvocationTargetException
            at java.lang.reflect.Constructor.newInstance(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
            at android.view.LayoutInflater.createView(LayoutInflater.java:607)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
            at android.view.View.inflate(View.java:18524)
            at com.cocosw.bottomsheet.BottomSheet.init(BottomSheet.java:265)
            at com.cocosw.bottomsheet.BottomSheet.onCreate(BottomSheet.java:523)
            at android.app.Dialog.dispatchOnCreate(Dialog.java:373)
            at android.app.Dialog.show(Dialog.java:274)
            at com.cocosw.bottomsheet.BottomSheet$Builder.show(BottomSheet.java:831)
            at com.hkm.editorial.ArticlePage$2.onClick(ArticlePage.java:89)
            at android.view.View.performClick(View.java:4785)
            at android.view.View$PerformClick.run(View.java:19858)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:155)
            at android.app.ActivityThread.main(ActivityThread.java:5696)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
     Caused by: java.lang.NumberFormatException: Invalid int: "res/drawable/actionbar_bg_hb_white.xml"
            at java.lang.Integer.invalidInt(Integer.java:138)
            at java.lang.Integer.parse(Integer.java:410)
            at java.lang.Integer.parseInt(Integer.java:367)
            at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:128)
            at android.content.res.TypedArray.getInt(TypedArray.java:322)
            at android.view.animation.Animation.<init>(Animation.java:246)
            at android.view.animation.AnimationSet.<init>(AnimationSet.java:81)
            at android.view.animation.AnimationUtils.createAnimationFromXml(AnimationUtils.java:115)
            at android.view.animation.AnimationUtils.createAnimationFromXml(AnimationUtils.java:93)
            at android.view.animation.AnimationUtils.loadAnimation(AnimationUtils.java:74)
            at android.view.animation.LayoutAnimationController.setAnimation(LayoutAnimationController.java:184)
            at android.view.animation.LayoutAnimationController.<init>(LayoutAnimationController.java:114)
            at android.view.animation.AnimationUtils.createLayoutAnimationFromXml(AnimationUtils.java:192)
            at android.view.animation.AnimationUtils.createLayoutAnimationFromXml(AnimationUtils.java:171)
            at android.view.animation.AnimationUtils.loadLayoutAnimation(AnimationUtils.java:152)
            at android.view.ViewGroup.initFromAttributes(ViewGroup.java:553)
            at android.view.ViewGroup.<init>(ViewGroup.java:493)
            at android.widget.AdapterView.<init>(AdapterView.java:238)
            at android.widget.AbsListView.<init>(AbsListView.java:904)
            at android.widget.GridView.<init>(GridView.java:129)
            at android.widget.GridView.<init>(GridView.java:125)
            at android.widget.GridView.<init>(GridView.java:121)
            at java.lang.reflect.Constructor.newInstance(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
            at android.view.LayoutInflater.createView(LayoutInflater.java:607)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
            at android.view.View.inflate(View.java:18524)
            at com.cocosw.bottomsheet.BottomSheet.init(BottomSheet.java:265)
            at com.cocosw.bottomsheet.BottomSheet.onCreate(BottomSheet.java:523)
            at android.app.Dialog.dispatchOnCreate(Dialog.java:373)
            at android.app.Dialog.show(Dialog.java:274)
            at com.cocosw.bottomsheet.BottomSheet$Builder.show(BottomSheet.java:831)
            at com.hkm.editorial.ArticlePage$2.onClick(ArticlePage.java:89)
            at android.view.View.performClick(View.java:4785)
            at android.view.View$PerformClick.run(View.java:19858)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:155)
            at android.app.ActivityThread.main(ActivityThread.java:5696)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)

im trying to create a grid like sheet from the bottom with the share provider content.. This is what I got in the app with Android 5.0 lilpop. Anyone can help me? I just dont know where to start fixing it.

soarcn commented 9 years ago

well, as the exception shows, something got wrong in your xml.

Caused by: java.lang.NumberFormatException: Invalid int: "res/drawable/actionbar_bg_hb_white.xml"
            at java.lang.Integer.invalidInt(Integer.java:138)
            at java.lang.Integer.parse(Integer.java:410)
            at java.lang.Integer.parseInt(Integer.java:367)

check your layoutAnimation attribute in your style file.

and to got know how to create a share provider, just check the sample application.

soarcn commented 9 years ago

Leave your comments if you still have the issue.