I am creating an app with Fragments and in one of them, I created a non-default constructor and got this warning:
Avoid non-default constructors in fragments: use a default constructor plus Fragment#setArguments(Bundle) instead
Can someone tell me why this is not a good idea?
Can you also suggest how I would accomplish this:
public static class MenuFragment extends ListFragment {
    public ListView listView1;
    Categories category;
    //this is my "non-default" constructor
    public MenuFragment(Categories category){
        this.category = category;
    }....
Without using the non-default constructor?
 
     
     
     
     
     
     
     
     
     
    