android - AccountAuthenticatorActivity 和 Fragments

标签 android android-fragments android-authenticator android-account

当我使用支持包时,是否可以通过 AccountAuthenticatorActivity 使用 fragment ? AccountAuthenitactorActivity 不是 FragmentActivity 类的子类,因此我不确定在使用 Support 包时如何使用 Fragment。

最佳答案

不,但 AccountAuthenticatorActivity 只是一个辅助类,它对 AccountAuthenticatorResponse 进行一些基本的检查 - 您不需要将其子类化。

只需借用(例如,来自 here - 代码在此快照和 ICS 之间没有任何更改)相关功能并扩展您想要的任何基类,一切顺利。

关于android - AccountAuthenticatorActivity 和 Fragments,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8932009/

相关文章:

android - Here Maps - 在 TabLayout 的 fragment 中使用 MapFragment

android - fragment 保存 View 状态

android - 互联网不稳定时处理访问 token 过期

android - 无法从不同的应用程序获取自定义帐户的 AuthToken

java - 如何定期检查 Parse Server 上的更新?

android - 上传照片到 Facebook : Adding parameters before executing the newUploadPhotoRequest call gives the 'OAuthException' error

Android Studio 构建失败 : TaskExecutionException: Execution failed for task ':app:transformClassesWithProfilers-transformForAppDebug'

android - 启用 Wifi 和移动数据时 android 操作系统的行为

java - fragment 和垃圾收集器

安卓 : AccountPicker set Light Theme