According to this link: ListFragment android developers
I want to set my custom layout for list, but it makes exceptions.
Here is the code:
p
This might be easier: Create your layout as you would normally but don't add the list/empty/loading stuff. Then in your listfragment's onCreateView:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = super.onCreateView(inflater, container, savedInstanceState);
ViewGroup parent = (ViewGroup) inflater.inflate(R.layout.mylayout, container, false);
parent.addView(v, 0);
return parent;
}
Now you can use setListShown...