5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Fragment in FragmentはgetChildFragmentManager()

Posted at

FragmentPagerAdapter内のFragmentの管理というか、動作が上手くいかず、ハマった。
公式リファレンスちゃんと読めよという事だと思うが、反省もかねて備忘録

Fragmentのネスト(入れ子)構造は、FragmentManagerとかでやるやつで、よく見ると思うのですが、
いつも、Activity内でFragmentを使っていた為、Fragment内でFragmentを使う時も同様だろうと思っていた。
しかし、上手く作動しない。
Fragment内でFragmentを使う場合、つまりFragment in Fragmentは
getChildFragmentManager()
を使うとの事。

5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?