- 主机 Activity:
TelecomActivity
- Fragment:
ContactResultsFragment
- 根布局:
@layout/list_fragment
此页面的菜单以程序化方式设置为“不可见”。
图 1.搜索屏幕
将搜索字段设为工具栏自定义视图 @layout/search_layout
@layout/search_view_layout_override
- 样式。
@style/Widget.Dialer.SearchView
- “关闭”按钮。
@drawable/ic_close
- “关闭”按钮。
列表项布局。@layout/contact_result
组件 [id:]ClassName | 属性 | 值 |
---|---|---|
contact_result: ConstraintLayout |
background |
?android:attr/selectableItemBackground |
height |
@dimen/contact_result_height |
|
contact_picture: ImageView |
width |
@dimen/avatar_icon_size |
height |
@dimen/avatar_icon_size |
|
layout_marginStart |
@dimen/contact_result_avatar_margin |
|
contact_name: TextView |
textAppearance |
@style/TextAppearance.ContactResultTitle |
layout_marginStart |
@dimen/contact_result_name_margin |