Monday, 15 September 2014

android - Unable to Start an Activity From NavDrawer Fragment -



android - Unable to Start an Activity From NavDrawer Fragment -

hi using navigation drawer in application. navdrawer fragment want open 1 activity , , want show listview in activity tried add together these 2 intent start activity , added new customlistview activity in manifest file, doesn't works,

intent openlist = new intent(getactivity(), customlistview.class); principalspeechfragment.this.startactivity(openlist); intent openlist = new intent(getactivity(), customlistview.class); startactivity(openlist);

and app unfortunately getting closed. can tell me solution this?

logcat errors are:

10-13 01:49:19.391: e/androidruntime(17979): fatal exception: main 10-13 01:49:19.391: e/androidruntime(17979): process: com.example.everwinvidhyashram, pid: 17979 10-13 01:49:19.391: e/androidruntime(17979): java.lang.nullpointerexception 10-13 01:49:19.391: e/androidruntime(17979): @ com.example.everwinvidhyashram.principalspeechfragment$1.onclick(principalspeechfragment.java:59) 10-13 01:49:19.391: e/androidruntime(17979): @ android.view.view.performclick(view.java:4456) 10-13 01:49:19.391: e/androidruntime(17979): @ android.view.view$performclick.run(view.java:18465) 10-13 01:49:19.391: e/androidruntime(17979): @ android.os.handler.handlecallback(handler.java:733) 10-13 01:49:19.391: e/androidruntime(17979): @ android.os.handler.dispatchmessage(handler.java:95) 10-13 01:49:19.391: e/androidruntime(17979): @ android.os.looper.loop(looper.java:136) 10-13 01:49:19.391: e/androidruntime(17979): @ android.app.activitythread.main(activitythread.java:5086) 10-13 01:49:19.391: e/androidruntime(17979): @ java.lang.reflect.method.invokenative(native method) 10-13 01:49:19.391: e/androidruntime(17979): @ java.lang.reflect.method.invoke(method.java:515) 10-13 01:49:19.391: e/androidruntime(17979): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:785) 10-13 01:49:19.391: e/androidruntime(17979): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:601) 10-13 01:49:19.391: e/androidruntime(17979): @ dalvik.system.nativestart.main(native method)

android android-fragments

No comments:

Post a Comment