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

NullPointer in QuickReturnAdapter #17

Closed
DipoAreoye opened this issue Nov 3, 2014 · 5 comments
Closed

NullPointer in QuickReturnAdapter #17

DipoAreoye opened this issue Nov 3, 2014 · 5 comments

Comments

@DipoAreoye
Copy link

I've come across an error with the adapter using a list view with certain mobile phones.

Genymotion HTC one - API Level 18
sony xperia c5303 - API Level 18
sony xxperia Z1 - API Level 14

java.lang.NullPointerException
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:548)
at android.view.View.measure(View.java:15848)
at com.felipecsl.quickreturn.library.widget.QuickReturnAdapter.getView(QuickReturnAdapter.java:99)

line 99:
v.measure(View.MeasureSpec.makeMeasureSpec( parent.getWidth() / numColumns , View.MeasureSpec.AT_MOST), heightMeasureSpec);

what could be causing the error? It works fine on other phones ive tested i.e nexus 5.

@dmitriigriazin
Copy link
Contributor

Very sad issue, the same problem on galaxy S3, fine on S5

@felipecsl
Copy link
Owner

I'll take a look at this

@dmitriigriazin
Copy link
Contributor

I've fixed it, now works well on S3. The thing whas that the layoutParams were not explicitly set up before the v.measure() was called.

@felipecsl
Copy link
Owner

can you submit a pull request please?

@felipecsl
Copy link
Owner

Fixed via #22

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