在新的联系人自定义字段 [英] Custom fields on new contact

查看:184
本文介绍了在新的联系人自定义字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是添加新联系人窗口。是否有可能在此窗口中创建自定义数据字段?

This is the 'add new contact' window. Is it possible to create custom data fields in this window?

我目前的自定义字段只有联系方式窗口可见。

My current custom fields are only visible on the 'contact details' window.

推荐答案

有可能推出一个新的添加新联系人的活动,当用户点击添加新联系人按钮。对于你必须创建自己的活动和的setContentView(R.layout.YOUR_CUSTOM_ACTIVITY_SCREEN)。现在,下一个步骤是重要的。以下行添加到您的应用程序的ManifestFile:

It is possible to launch a new Add New Contact activity when the user clicks on the add new contact button. For that you will have to create your own activity and setContentView(R.layout.YOUR_CUSTOM_ACTIVITY_SCREEN). Now the next step is important. Add the following lines to the ManifestFile of your application:

<activity android:name=".YOUR_CUSTOM_ACTIVITY" >
        <intent-filter>
            <action android:name="android.intent.action.INSERT" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="vnd.android.cursor.dir/contact"/>
        </intent-filter>
    </activity>

现在,当用户点击添加,他会显示两个选项一个新的联系人。一会是您的应用程序和其他将是默认的活动添加联系人。

Now when the user click to add a new contact he will be shown 2 options. One will be your application and other would be the default activity to add contact.

希望这个答案可以帮助。

Hope this answer helps.

这篇关于在新的联系人自定义字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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