Code-Apprentice
Code-Apprentice

Reputation: 83527

Robolectric and FragmentTestUtil

I recently learned about FragmentTestUtil.startFragment(). However, in using it, I am stuck. In particular, how do I get the views from the fragment so that I can check if they are visible, enabled, disabled, etc. as the case may be?

Upvotes: 1

Views: 488

Answers (1)

nenick
nenick

Reputation: 7438

Just

fragment.getActivity().findViewById(...)

should work.

Upvotes: 2

Related Questions