Azizi Musa
Azizi Musa

Reputation: 1029

Bind getActivity().findViewById() using Butterknife

Is that possible to do getActivity().findViewById() using @Bind. I want to bind view in another fragment using this way. But so far it can only be done in standard way :

Button mSubmit = (Button) getActivity().findViewById(R.id.btnSubmit)

Upvotes: 1

Views: 520

Answers (1)

I'm not sure I fully understand the question, but it seems like using the two argument form of ButterKnife.bind would work -- pass getActivity() as the 2nd argument.

(I suspect this may have already been answered -- if someone wants to find an existing answer, please do.)

Upvotes: 1

Related Questions