0

I am using a ViewPager with a FragmentPagerAdapter inside a FragmentActivity (say that five times fast - I dare you :)

Anyways, I have things displaying correctly but I need to be able to intialise my views. Before fragments, its easy: Assign an id to the view, then use FindViewById - but FragmentPagerAdapter loads view lazily (as it should).

My Question: How can I access those view to initialise them.

Thanks in advance for any help.

4

1 に答える 1

1

How can I access those view to initialise them.

Use findViewById() in onCreateView(), onActivityCreated(), etc. of your fragment.

于 2012-09-04T22:25:22.883 に答える