I am having the following method which passes View
private void doSomething(View view){ }
The problem am having is how do i call this view in onCreate method in an Activity, i will have to pass the view
For Example
View view;
doSomething(view)
How do is assign view/instantiate view, am using getView() but its not working
Like
view = getView()
For Example in fragments onViewCreatedMethod has an argument view which i can assign to the method when am calling it. Example below
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
doSomething(view);
}
Is it possible to do that inside onCreate method in fragment, can I parse the View arguments in onCreate method in activity