Reputation: 112
Using Android Studio on a project with the minimum SDK set to API 15, if I use the UI to generate a new "Blank Activity with Fragment" (or any other activity template that uses fragments), the generated fragment will inherit from android.support.v4.app.Fragment. But if I use the UI to generate a new "Blank Fragment," it inherits from the native android.app.Fragment. What logic does the IDE use to select which one to inherit from? Is there any way to force it to always use one or the other, so I don't have to go about changing the imports?
Upvotes: 0
Views: 124
Reputation: 5420
You can not change the default Android Fragment class creation in the IDE and I do not think this is a huge thing.
But if you are really worried about this, :) you can create your own custom File Template for Fragment in Android Studio and reuse it all the time or Gist it and keep it.
Upvotes: 1