AccountAuthenticatorActivity
全部标签 我正在尝试编写自己的Authenticator并将其用作两个不同应用程序的库:A和B。我关注了这篇文章:http://udinic.wordpress.com/2013/04/24/write-your-own-android-authenticator/.我安装了应用程序A,然后安装了应用程序B。当应用程序A调用AccountManager.addAccount()时,AccountAuthenticatorActivity打开。当应用程序B调用AccountManager.addAccount()时,什么也没有发生。如果我卸载应用A并在应用B中重试,AccountAuthentic
我正在按照教程制作身份验证器:http://blog.udinic.com/2013/04/24/write-your-own-android-authenticator/登录Activity需要扩展AccountAuthenticatorActivity,问题从这里开始:AccountAuthenticatorActivity扩展常规Activity而不是AppCompatActivity.在AppCompat中使用常规Activity会导致Activity没有ActionBar。我想使用AccountAuthenticatorActivity并且有一个ActionBar。
当我使用支持包时,是否可以通过AccountAuthenticatorActivity使用fragment?AccountAuthenitactorActivity不是FragmentActivity类的子类,因此我不确定在使用Support包时如何使用Fragment。 最佳答案 不,但AccountAuthenticatorActivity只是一个辅助类,它对AccountAuthenticatorResponse进行一些基本的检查-您不需要将其子类化。只需借用(例如,来自here-代码在此快照和ICS之间没有任何更改)相关功能