I create this post, because i am new at this, and i need a little help. I am doing a little exercise about a application you that put your name, and it returns \"hello (the
In my case I was accidentally returning a child view from within Layout.onCreateView() as shown below:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_reject, container, false);
Button button = view.findViewById(R.id.some_button);
return button; // <-- Problem is this
}
The solution was to return the parent view instead of the child view.