This is listview onClivk listener
lv.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView<?>
arg0, View view, int
position,
long id)
{
RecordObjects
obj=(RecordObjects)lv.getItemAtPosition(position);
String name=obj.getName();
String url=obj.getUrl();
intent=new
Intent(getActivity(),player.class);
intent.putExtra("task","Draft");
intent.putExtra("name",name);
intent.putExtra("read_path",url);
startActivityForResult(intent, 0);
}
});
and the error i got is:
05-09 16:19:07.723: D/PhoneWindow(7043): couldn't save which view has
focus because the focused view android.widget.LinearLayout@44ecc1d8
has no id.
05-09 16:19:07.741: D/AndroidRuntime(7043): Shutting down VM
05-09 16:19:07.741: W/dalvikvm(7043): threadid=3: thread exiting with
uncaught exception (group=0x4001b188)
05-09 16:19:07.751: E/AndroidRuntime(7043): Uncaught handler: thread
main exiting due to uncaught exception
05-09 16:19:07.771: E/AndroidRuntime(7043):
java.lang.RuntimeException: Unable to pause activity {com.m2.smartGui/
com.m2.smartGui.smartGuiPagerFragmentActivity}:
java.lang.NullPointerException
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:
3162)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:
3119)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.app.ActivityThread.handlePauseActivity(ActivityThread.java:
3102)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.app.ActivityThread.access$2400(ActivityThread.java:119)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1870)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.os.Handler.dispatchMessage(Handler.java:99)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.os.Looper.loop(Looper.java:123)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.app.ActivityThread.main(ActivityThread.java:4363)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
java.lang.reflect.Method.invokeNative(Native Method)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
java.lang.reflect.Method.invoke(Method.java:521)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
dalvik.system.NativeStart.main(Native Method)
05-09 16:19:07.771: E/AndroidRuntime(7043): Caused by:
java.lang.NullPointerException
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.support.v4.app.FragmentManagerImpl.saveFragmentBasicState(FragmentManager.java:
1576)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.support.v4.app.FragmentManagerImpl.saveAllState(FragmentManager.java:
1617)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.support.v4.app.FragmentActivity.onSaveInstanceState(FragmentActivity.java:
481)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
com.m2.smartGui.smartGuiPagerFragmentActivity.onSaveInstanceState(smartGuiPagerFragmentActivity.java:
78)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.app.Activity.performSaveInstanceState(Activity.java:1022)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:
1180)
05-09 16:19:07.771: E/AndroidRuntime(7043): at
android.app.ActivityThread.performPauseActivity(ActivityThread.java:
3144)
05-09 16:19:07.771: E/AndroidRuntime(7043): ... 12 more
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en