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

NullPointerException on make view #51

Closed
Zerosouth opened this issue Feb 12, 2014 · 3 comments
Closed

NullPointerException on make view #51

Zerosouth opened this issue Feb 12, 2014 · 3 comments
Assignees

Comments

@Zerosouth
Copy link

java.lang.NullPointerException
at com.etsy.android.grid.ExtendableListView.getLastVisiblePosition(ExtendableListView.java:1830)
at android.widget.AdapterView.onInitializeAccessibilityEvent(AdapterView.java:957)
at android.widget.AbsListView.onInitializeAccessibilityEvent(AbsListView.java:1488)
at android.view.View.sendAccessibilityEventUncheckedInternal(View.java:4936)
at android.view.View.sendAccessibilityEventUnchecked(View.java:4923)
at android.view.View$SendViewStateChangedAccessibilityEvent.run(View.java:19486)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5086)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)

@denizmveli denizmveli added the bug label Feb 17, 2014
@denizmveli denizmveli self-assigned this Feb 17, 2014
@denizmveli
Copy link
Contributor

A stacktrace is great when accompanied with an explanation of how that exception was created. Can you help me out here?

@Zerosouth
Copy link
Author

I was AndroidStaggeredGridView using programmatically in fragment.

and..

mSGV = new StaggeredGridView(ctx);
mSGV.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));

footerView = inflater.inflate(R.layout.footer_trends_ave_list, null);
mSGV.setFooterView(footerView);

int margin = getResources().getDimensionPixelSize(R.dimen.margin);
mSGV.setItemMargin(margin);
mSGV.setPadding(margin, 0, margin, 0);

mSGV.setOnScrollListener(this);
mSGV.setAdapter(trendsAdapter);
layout.addView(mSGV);

and..
trendsAdapter.notifyDataSetChanged();

However, this error does not appear in any device android 4.4 (Kitkat) occurs in some devices.

@denizmveli
Copy link
Contributor

Duplicate of #45 - closing to manage this there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants