@Retention(value=CLASS)
@Target(value=CONSTRUCTOR)
public @interface ContentView
LayoutRes
parameter
to denote what layout the component intends to inflate and set as its content.
It is strongly recommended that components that support this annotation specifically call it out in their documentation.
public class MainFragment extends Fragment { public MainFragment() { // This constructor is annotated with @ContentView super(R.layout.main); } }
androidx.activity.ComponentActivity#ComponentActivity(int)
,
androidx.fragment.app.Fragment#Fragment(int)