DEV Community

Cover image for OncreateView in Fragments(Android) has been deprecated
Kluivert
Kluivert

Posted on

OncreateView in Fragments(Android) has been deprecated

Hello guys, ummm basically fragments can work fine without the 'OncreateView' method.

Alt Text

Remove the OncreateView method and inflate your layout in the "Fragment()" and it will be "Fragment(R.layout.activity_main)".

Try that and it works fine. that's all.

Latest comments (1)

Collapse
 
ngacho profile image
Ngacho

Could you please add on it