recently i saw some articles about inflating the fragment layout directly from the Fragment()
class ExampleFragment: Fragment(R.layout.example_fragment)
does this stand only for fragments that dont hold any data and interaction, when should we use this method
This was added in androidx.fragment version 1.1.0:
So in essence it's a shorthand for overriding
onCreateView()that just inflates a layout and returns it, and encourages a style of configuring the view inonViewCreated()rather thanonCreateView().