AccountAuthenticatorActivity and fragments

a 夏天 提交于 2020-01-22 10:29:48

问题


Is there are way to use fragments with the AccountAuthenticatorActivity when I'm using the Support Package? AccountAuthenitactorActivity does not subclass the FragmentActivity class and therefore I'm not sure how to use fragments with it when I'm using the Support package.


回答1:


No, but the AccountAuthenticatorActivity is just a helper class that does some basic plumbing on the AccountAuthenticatorResponse - you're not required to subclass it.

Just borrow (from here, for instance - the code hasn't changed any between this snapshot and ICS) the relevant functionality and extend whatever base class you want and you're good to go.



来源:https://stackoverflow.com/questions/8932009/accountauthenticatoractivity-and-fragments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!