QuickContactBadge的用法
来源:互联网 发布:the python challenge 编辑:程序博客网 时间:2024/06/06 02:58
以前看到人家程序里面的点击某个头像出现类似PopWindow的UI,觉得非常的酷,今天看系统SMS的源代码,发现原来是系统已经提供的控件,QuickContactBadge!汗!
先看看QuickContactBadge如何使用:
其他它的使用是非常简单的,和系统其他的控件的使用是一样一样滴。如api demo里面的:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:paddingLeft="0dip"
android:paddingRight="9dip"
android:layout_height= "wrap_content"
android:minHeight="48dip">
<QuickContactBadge
android:id="@+id/badge"
android:layout_marginLeft="2dip"
android:layout_marginRight="14dip"
android:layout_marginTop="4dip"
android:layout_marginBottom="3dip"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_height= "wrap_content"
android:layout_width= "wrap_content"
android:src="@drawable/ic_contact_picture"
style="?android:attr/quickContactBadgeStyleWindowSmall" />
<TextView
android:id="@+id/name"
android:textAppearance="?android:attr/textAppearanceMedium"
android:paddingLeft="2dip"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/badge"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</RelativeLayout>
然后呢,你只需要给他绑定你联系人的uri就行了,但是注意如果有的号码没有uri如何解决?
assignContactUri(Uri contactUri)或者
assignContactFromPhone(String phoneNumber, boolean lazyLookup)
即可。
多看开源代码哇!
- QuickContactBadge的用法
- QuickContactBadge的用法
- QuickContactBadge的用法
- QuickContactBadge的用法
- QuickContactBadge的学习 快速关联联系人
- Android UI , QuickContactBadge, SeekBar, 自定义漂亮的Android SeekBar样式
- 安卓用QuickContactBadge和AsyncQueryHandler实现联系人列表的完美实现
- QuickContactBadge(联系人快捷标识控件)的使用
- Android QuickContactBadge
- Android界面编程之QuickContactBadge(一幅图片关联到手机上的一个联系人)
- 使用QuickContactBadge关联联系人
- android_控件之quickcontactbadge
- android.widget.QuickContactBadge
- QuickContactBadge去掉三角
- QuickContactBadge 自定义获取联系人
- QuickContactBadge联系人学习
- contacts里QuickContactBadge弹出窗口
- android中提供了QuickContactBadge
- linux vsftp 没有权限上传文件的解决方法
- makefile 转贴
- webservice 笔记(小结) axis2 集成spring 传递对象
- powerlink介绍
- 电子工程师基础知识
- QuickContactBadge的用法
- httpclient
- 第六章 语句
- Centos5.4 搭建LAMP环境
- Android 属性系统
- 修改 Android 系统默认语言版本
- Delphi传中文参数给Jsp
- 实现axis2两种不同方式的客户端
- CTreeCtrl(图片和状态图片、动态提示、选中节点颜色、查询)