ContactPicker - 仿 Android 联系人列表界面的 Demo ,具有快速索引功能和搜索功能。(The Demo of imitation Android contact list UI with fast indexing and search capabilities.)
截图 Screenshot

下载 Demo Download
安装后请确保该应用有读取联系人权限。(After installation make sure that the application has permission to read contacts.)
Download
博客 Blog
《快速打造仿Android联系人界面》
用法 Usage
step 1
把QuickIndexBar控件添加到你的布局文件中。(Include the QuickIndexBar widget in your layout.)
android:id="@+id/qib"
android:layout_width="25dp"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:background="#aa000000" />
step 2
可以在onCreate(Bundle savedInstanceState)中添加OnIndexChangeListener。具体使用方法可以参考代码。(You can add theOnIndexChangeListener for QuickIndexBar in onCreate(Bundle savedInstanceState).Specific methods can refer to the code.)
qib.setOnIndexChangeListener(new QuickIndexBar.OnIndexChangeListener() {
@Override
public void onIndexChange(int section) {
...
}
@Override
public void onActionUp() {
...
}
});
好了,享受吧!(Well, enjoy it!)
自定义属性 Customization
你可在下面属性中自定义任何你想要的。(You can customize any of the following properties you want.)
Name
format
Description
font_color
color|reference
字体颜色(Font Color)
selected_font_color
color|reference
选中时字体的颜色(Selected Font Color)
font_size
dimension|reference
字体大小(Font Size)
这篇博客介绍了如何使用ContactPicker Demo来创建一个类似Android联系人列表的界面,该界面具备快速索引和搜索功能。在布局文件中添加QuickIndexBar控件,并在onCreate方法中设置OnIndexChangeListener。此外,还提供了自定义属性的选项,如字体颜色、大小等。要正常使用,应用需获取读取联系人的权限。

6401

被折叠的 条评论
为什么被折叠?



