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

Exception thrown in DialogFragment #50

Open
usernotnull opened this issue Jan 22, 2017 · 0 comments
Open

Exception thrown in DialogFragment #50

usernotnull opened this issue Jan 22, 2017 · 0 comments

Comments

@usernotnull
Copy link

usernotnull commented Jan 22, 2017

java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.drawable.Drawable.getIntrinsicHeight()' on a null object reference
at com.yqritc.recyclerviewflexibledivider.HorizontalDividerItemDecoration.getDividerSize(HorizontalDividerItemDecoration.java:90)
at com.yqritc.recyclerviewflexibledivider.HorizontalDividerItemDecoration.setItemOffsets(HorizontalDividerItemDecoration.java:79)
at com.yqritc.recyclerviewflexibledivider.FlexibleDividerDecoration.getItemOffsets(FlexibleDividerDecoration.java:158)
at android.support.v7.widget.RecyclerView.getItemDecorInsetsForChild(RecyclerView.java:4489)
at android.support.v7.widget.RecyclerView$LayoutManager.measureChildWithMargins(RecyclerView.java:8443)

The above exception is thrown when the decoration is used with a dialog , i'll copy the style I used below:

<style name="NoFrameDialog" parent="@style/AppTheme.Dialog">
    <item name="android:windowBackground">@null</item>
    <item name="android:windowFrame">@null</item>
    <item name="android:windowNoTitle">true</item>
    <item name="android:backgroundDimEnabled">true</item>
</style>

I also checked it happens when using no dialog style so it's a matter of using the decoration with a recyclerview in a DialogFragment

@usernotnull usernotnull changed the title Exception thrown in no_frame dialogs Exception thrown in DialogFragment Jan 22, 2017
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

1 participant