AccountAuthenticator活动和片段 [英] AccountAuthenticatorActivity and fragments

查看:71
本文介绍了AccountAuthenticator活动和片段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用支持包时,是否可以通过AccountAuthenticatorActivity使用片段?AccountAuthenitactorActivity不会将FragmentActivity类作为子类,因此,在使用支持包时,我不确定如何将其与片段一起使用.

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.

推荐答案

否,但是 AccountAuthenticatorActivity 只是一个帮助程序类,它对 AccountAuthenticatorResponse 进行一些基本的设置-您不需要将其子类化.

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

只需借用(从此处 –该快照和ICS之间的代码未发生任何更改)相关功能,并扩展了所需的任何基类,您很高兴.

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.

这篇关于AccountAuthenticator活动和片段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆