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

You must supply a layout_width attribute #92

Open
Duna opened this issue Feb 3, 2020 · 3 comments
Open

You must supply a layout_width attribute #92

Duna opened this issue Feb 3, 2020 · 3 comments

Comments

@Duna
Copy link

Duna commented Feb 3, 2020

Caused by: java.lang.UnsupportedOperationException: Binary XML file line #7: You must supply a layout_width attribute.
at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:779)
at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:8147)
at android.view.ViewGroup$MarginLayoutParams.(ViewGroup.java:8339)
at android.widget.FrameLayout$LayoutParams.(FrameLayout.java:439)
at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:370)
at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:56)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:865)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at com.github.mrengineer13.snackbar.SnackBar.(SnackBar.java:77)
at com.github.mrengineer13.snackbar.SnackBar$Builder.(SnackBar.java:128)
at com.million.duna.basefragments.FragmentGame$MyEventBus$3.run(FragmentGame.java:235)

@MrDick-11
Copy link

got the same error. Any solution?

@feihong247
Copy link

feihong247 commented Mar 23, 2023 via email

@MrDick-11
Copy link

solved by copying sb_snack.xml to layouts and adding
android:layout_width="match_parent"
android:layout_height="match_parent"

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