Fragment without activity

后端 未结 7 1813
夕颜
夕颜 2020-12-29 06:14

I have been asked an interview question: Can a fragment exist without activity? I searched for answers but didn\'t get a proper answer and explanation. Can

7条回答
  •  感动是毒
    2020-12-29 06:23

    Android app must have an Activity or FragmentActivity that handles the fragment.

    Fragment can't be initiated without Activity or FragmentActivity.

提交回复
热议问题