Skip to main content

Use JVM static Annotation

companion object {@JVMStatic Annotation

companion object {  // TODO: Rename and change types and number of parameters @JvmStatic fun newInstance(param1: String, param2: String) = EditProfileFragment().apply { arguments = Bundle().apply { putString(ARG_PARAM1, param1) putString(ARG_PARAM2, param2) } } } 

Use JVM static Annotation

companion object {

 // TODO: Rename and change types and number of parameters @JvmStatic fun newInstance(param1: String, param2: String) = EditProfileFragment().apply { arguments = Bundle().apply { putString(ARG_PARAM1, param1) putString(ARG_PARAM2, param2) } } } 

Use @JVMStatic Annotation

companion object {  // TODO: Rename and change types and number of parameters @JvmStatic fun newInstance(param1: String, param2: String) = EditProfileFragment().apply { arguments = Bundle().apply { putString(ARG_PARAM1, param1) putString(ARG_PARAM2, param2) } } } 
Source Link

Use JVM static Annotation

companion object {

 // TODO: Rename and change types and number of parameters @JvmStatic fun newInstance(param1: String, param2: String) = EditProfileFragment().apply { arguments = Bundle().apply { putString(ARG_PARAM1, param1) putString(ARG_PARAM2, param2) } } }