I am trying to make a scientific calculator inside a fragment. Actually following a YT video and that guy is doing all that in his mainactivity not the fragment. I used this code in xml of my fragment:

```
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    return inflater.inflate(R.layout.fragment_scientific_calculator, container, false);
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    previousCalculation = view.findViewById(R.id.previousCalculationView);
    display = view.findViewById(R.id.displayEditText);

}

private void updateText(String strTOAdd) {
    display.setText(strTOAdd);
}

public void zeroBTNPush(View view) {
    updateText("0");
}

```

All I know is that to use findViewById in a fragment, I have to create a onViewCreated void. So after doing all this I should get the updateText function in fragment.java>design>attributes>onClick but I get nothing there
[enter image description here](https://i.stack.imgur.com/KwWFo.jpg)
I'm new to this. Please help