- 主机 Activity:
TelecomActivity - Fragment:
FavoriteFragment

图 1. “收藏夹”屏幕
布局:@layout/favorite_fragment
@+id/empty_page_container组件 [id:]ClassName 属性 值 TextViewtextAppearance?android:attr/textAppearanceLargestring@string/favorites_emptylayout_marginBottom@dimen/favorite_add_button_and_text_separationadd_favorite_button: UxrButtonheight@dimen/touch_target_sizeandroid:textAppearance?android:attr/textAppearanceMediumtextColor@color/hero_button_text_colorbackground@drawable/hero_button_backgroundpaddingHorizontal@dimen/favorite_add_button_paddingapp:carUxRestrictionsUX_RESTRICTIONS_NO_SETUP

图 2. @layout/favorite_fragment
布局:@layout/favorite_fragment
@+id/favorite_list_fragment. FavoriteListFragment>@layout/list_fragment
收藏的联系人内容。@layout/favorite_contact_list_item
| 组件 [id:]ClassName |
属性 | 值 |
|---|---|---|
root: LinearLayout |
orientation |
vertical |
gravity |
center_horizontal |
|
background |
?android:attr/selectableItemBackground |
|
icon: ImageView |
width |
@dimen/large_avatar_icon_size |
height |
@dimen/large_avatar_icon_size |
|
marginBottom |
@dimen/favorites_avatar_margin_bottom |
|
title: TextView |
textAppearance |
?android:attr/textAppearanceLarge |
text: TextView |
textAppearance |
?android:attr/textAppearanceSmall |
添加“收藏夹”按钮。@layout/add_favorite_list_item
| 组件 [id:]ClassName | 属性 | 值 |
|---|---|---|
title: UxrButton |
text |
@string/add_favorite_button |
textColor |
@color/hero_button_text_color |
|
textAppearance |
?android:attr/textAppearanceLarge |
|
background |
?android:attr/selectableItemBackground |
|
drawableTop |
@drawable/ic_add_favorite |