Android : Exception in MessageQueue callback: handleReceiveCallback while using free flow library

on Friday, August 1, 2014


i am using free flow layout library in my android app

https://github.com/Comcast/FreeFlow


Here is my code for opening another activity when click on any of image:



public void onDataLoaded(ParseImageHome feed, FreeFlowContainer container) {
// Log.d(TAG, "photo: " + feed.getShots().get(0).getImage_teaser_url());
adapter.update(feed);
container.dataInvalidated();
section = new Section();
for (Object o : feed.getShots()) {
section.getData().add(o);
}
container.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AbsLayoutContainer parent,
FreeFlowItem proxy) {

ParseImageHome p = (ParseImageHome) (section.getData()
.get(proxy.itemIndex));

String title = p.getHeadLine();
String descri = p.getDescription();
String link = p.getLink();
String image = p.getImg_url();
String date=p.getDispDate();

Intent i = new Intent(getActivity(), DetailActivity.class);
Bundle bundle = new Bundle();
bundle.putString("title", title);
bundle.putString("descri", descri);
bundle.putString("link", link);
bundle.putString("image", image);
bundle.putString("date", date);
i.putExtras(bundle);
startActivity(i);

}
});

container.addScrollListener(new OnScrollListener() {

@Override
public void onScroll(FreeFlowContainer container) {
Log.d(TAG, "scroll percent " + container.getScrollPercentY());
}
});
}


But when i am click on any item it shows following error



08-02 11:36:17.693: E/InputEventReceiver(2849): Exception dispatching input event.
08-02 11:36:17.693: E/MessageQueue-JNI(2849): Exception in MessageQueue callback: handleReceiveCallback
08-02 11:36:17.709: E/MessageQueue-JNI(2849): java.lang.NullPointerException
08-02 11:36:17.709: E/MessageQueue-JNI(2849): at android.content.ComponentName.<init>(ComponentName.java:77)
08-02 11:36:17.709: E/MessageQueue-JNI(2849): at android.content.Intent.<init>(Intent.java:3813)
08-02 11:36:17.709: E/MessageQueue-JNI(2849): at com.porcupyne.supergoon.HomeFragment$2.onItemClick(HomeFragment.java:178)
08-02 11:36:17.709: E/MessageQueue-JNI(2849): at com.comcast.freeflow.core.AbsLayoutContainer.performItemClick(AbsLayoutContainer.java:125)
08-02 11:36:17.709: E/MessageQueue-JNI(2849): at com.comcast.freeflow.core.FreeFlowContainer.performItemClick(FreeFlowContainer.java:1709)
08-02 11:36:17.709: E/MessageQueue-JNI(2849): at com.comcast.freeflow.core.FreeFlowContainer$PerformClick.run(FreeFlowContainer.java:1721)
08-02 11:36:17.709: E/MessageQueue-JNI(2849): at com.comcast.freeflow.core.FreeFlowContainer.touchUp(FreeFlowContainer.java:1082)
08-02 11:36:17.709: E/MessageQueue-JNI(2849): at com.comcast.freeflow.core.FreeFlowContainer.onTouchEvent(FreeFlowContainer.java:848)


but when i am printing onItemClick event on log it works fine

so please help me


0 comments:

Post a Comment