Utilisez FindViewByid en fragment

//java,how use findViewById in fragments,Android studio,2021/09/23

TextView textView;
textView=getView().findViewById(R.id.textView);

//use getView(). with it
RIPCode