android搜索功能demo,仿Android联系人列表界面的demo,具有快速索引功能和搜索功能...

这篇博客介绍了如何使用ContactPicker Demo来创建一个类似Android联系人列表的界面,该界面具备快速索引和搜索功能。在布局文件中添加QuickIndexBar控件,并在onCreate方法中设置OnIndexChangeListener。此外,还提供了自定义属性的选项,如字体颜色、大小等。要正常使用,应用需获取读取联系人的权限。
摘要由CSDN通过智能技术生成

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

截图 Screenshot

ba82674a37138af96e64bd56da104b46.gif

下载 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)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值