Here is my code for fragment extending ListFragment and below are the errors it is showing.Almost Same code is working fine for activity except that in activity i am getting
Try this way,hope this will help you to solve your problem.
There is two way to given ListView id.
1.android predefined id like :
XML
Activty
lv= (ListView) findViewById(android.R.id.list);
Fragment
lv= (ListView)rootView.findViewById(android.R.id.list);
2.Custom id like :
XML
Activty
lv= (ListView) findViewById(R.id.list);
Fragment
lv= (ListView)rootView.findViewById(R.id.list);