findViewById returns NULL when using Fragment

前端 未结 7 1832
终归单人心
终归单人心 2020-12-14 16:15

I\'m new to Android developing and of course on Fragments.

I want to access the controls of my fragment in main activity but \'findViewById\' returns null. without f

相关标签:
7条回答
  • 2020-12-14 17:18

    If you want use findViewById as you use at activities onCreate, you can simply put all in overrided method onActivityCreated.

    0 讨论(0)
提交回复
热议问题