I have a fragment that contains a custom view.
in the fragment I do ButterKnife.bindas follows:
View root = inflater.inflate(R.layout.fragment_home, container, false);
ButterKnife.bind(this, root);
And I manage to bind the views.
Now the snippet contains the custom view that I created. In a custom view, MenuToggleButtonI want to bind another view and work with it.
The problem I am facing is that I do not know how to access the root view of the fragment from within the user view (which is in the fragment).
public MenuToggleButton(Context context, AttributeSet attrs) {
super(context, attrs);
final Activity activity = (Activity) context;
ButterKnife.bind(this,
}
How can I get a representation of the root fragment to order to bind it like in a fragment?