自定义帐户的错误表示
我创建了自己的帐户类型,就像描述的那样 此处。在模拟器或带有标准 Android 联系人应用程序的 LG GT-540 上一切正常。在联系人应用程序中,我可以在编辑时看到正确的自定义联系人:
但是当我的同事使用 HTC 设备尝试此应用程序时(带有自己的联系人管理应用程序),他看到我的字符串“company_name.program_name.android.profile”(即 android:accountType)而不是“GeneDroid Profile”(即 android:label) xml/account-authenticator.xml 文件:
<?xml version="1.0" encoding="utf-8"?>
<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/app_name"
android:accountType="com.companyname.proframname.account"
android:icon="@drawable/ic_launcher"
android:smallIcon="@drawable/geni_logo"
android:accountPreferences="@xml/account_preferences"/>
我无法理解为什么会发生这种情况。我做错了什么?
I have created my own account type, like it's described here. Everything works fine on emulator or on my LG GT-540 with standard android contacts application. In Contacts application I can see proper custom contact while editing:
But when my colleague tried this app with HTC device (with its own contacts-management application), he saw the string "company_name.program_name.android.profile" (i.e. android:accountType) instead of "GeneDroid Profile" (i.e. android:label) of my xml/account-authenticator.xml file:
<?xml version="1.0" encoding="utf-8"?>
<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/app_name"
android:accountType="com.companyname.proframname.account"
android:icon="@drawable/ic_launcher"
android:smallIcon="@drawable/geni_logo"
android:accountPreferences="@xml/account_preferences"/>
I cannot understand why it happens. What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来它使用的是 accountType 而不是标签。我不认为你做错了什么。我唯一的建议是让它看起来也很漂亮。不幸的是,您还需要将其用作密钥,因此无法翻译它。
It looks like it's using the accountType instead of the label. I don't think it's anything you're doing wrong. My only suggestion would be to make that something that would look nice as well. Unfortunately you need to use it as a key as well so you can't translate it.