Nested Fragments, is it necessary to use support lib v4 even though I want to program for >13

StackOverflow https://stackoverflow.com/questions/19641283

  •  01-07-2022
  •  | 
  •  

Pergunta

I decided to make my app compatible with api level 13 and higher, so I can remove all the support libs and start using fragmentManager instead of supportFragmentManager etc.

However, now I realized that nested fragments (--> getChildFragmentManager() ) is just supported from api Level 17. Since I would like to use some other features that are not supported by the support lib v4 (valueAnimation for FragmentTransactions) I was hoping that support lib v13 would do the trick, but it seems like there are no 'v13 - versions' of Fragment and FragmentTransaction. (What is FragmentCompat supposed to be good for???)

My question is now, am I missing something here or do I really have to continue to work with support lib v4, FragmentActivity, supportFM etc...? And thus without valueAnimations for FragmentTransactions, in order to be able to keep using nested fragments.

Foi útil?

Solução

Yes, if you want to use nested fragments, you must use the support-v4 fragments framework or set your minSdkVersion to 17. Yes, this means you must continue using the view animation framework for fragment transitions.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top