از 27 مارس 2025، توصیه می کنیم از android-latest-release
به جای aosp-main
برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
موارد دلخواه
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
- فعالیت میزبان:
TelecomActivity
- قطعه:
FavoriteFragment

شکل 1. صفحه نمایش موارد دلخواه
طرح بندی. @layout/favorite_fragment
-
@+id/empty_page_container
مؤلفه [id:]ClassName | اموال | ارزش |
---|
TextView | textAppearance | ?android:attr/textAppearanceLarge |
| string | @string/favorites_empty |
| layout_marginBottom | @dimen/favorite_add_button_and_text_separation |
add_favorite_button: UxrButton | height | @dimen/touch_target_size |
| android:textAppearance | ?android:attr/textAppearanceMedium |
| textColor | @color/hero_button_text_color |
| background | @drawable/hero_button_background |
| paddingHorizontal | @dimen/favorite_add_button_padding |
| app:carUxRestrictions | UX_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 |
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Favorites\n\n- Host activity: `TelecomActivity`\n- Fragment: `FavoriteFragment`\n\n**Figure 1.**Favorites screen\n\nLayout. `@layout/favorite_fragment`\n\n- `@+id/empty_page_container`\n\n | **Component \\[id:\\]ClassName** | **Property** | **Value** |\n |----------------------------------|--------------------------|--------------------------------------------------|\n | `TextView` | `textAppearance` | `?android:attr/textAppearanceLarge` |\n | | `string` | `@string/favorites_empty` |\n | | `layout_marginBottom` | `@dimen/favorite_add_button_and_text_separation` |\n | `add_favorite_button: UxrButton` | `height` | `@dimen/touch_target_size` |\n | | `android:textAppearance` | `?android:attr/textAppearanceMedium` |\n | | `textColor` | `@color/hero_button_text_color` |\n | | `background` | `@drawable/hero_button_background` |\n | | `paddingHorizontal` | `@dimen/favorite_add_button_padding` |\n | | `app:carUxRestrictions` | `UX_RESTRICTIONS_NO_SETUP` |\n\n**Figure 2.**@layout/favorite_fragment\n\nLayout. `@layout/favorite_fragment`\n\n- `@+id/favorite_list_fragment. FavoriteListFragment` \\\u003e `@layout/list_fragment`\n\nFavorite contact item. `@layout/favorite_contact_list_item`\n\n| **Component \\[id:\\]ClassName** | **Property** | **Value** |\n|--------------------------------|------------------|------------------------------------------|\n| `root: LinearLayout` | `orientation` | `vertical` |\n| `root: LinearLayout` | `gravity` | `center_horizontal` |\n| `root: LinearLayout` | `background` | `?android:attr/selectableItemBackground` |\n| `icon: ImageView` | `width` | `@dimen/large_avatar_icon_size` |\n| `icon: ImageView` | `height` | `@dimen/large_avatar_icon_size` |\n| `icon: ImageView` | `marginBottom` | `@dimen/favorites_avatar_margin_bottom` |\n| `title: TextView` | `textAppearance` | `?android:attr/textAppearanceLarge` |\n| `text: TextView` | `textAppearance` | `?android:attr/textAppearanceSmall` |\n\nAdd Favorites button. `@layout/add_favorite_list_item`\n\n| **Component \\[id:\\]ClassName** | **Property** | **Value** |\n|--------------------------------|------------------|------------------------------------------|\n| `title: UxrButton` | `text` | `@string/add_favorite_button` |\n| | `textColor` | `@color/hero_button_text_color` |\n| | `textAppearance` | `?android:attr/textAppearanceLarge` |\n| | `background` | `?android:attr/selectableItemBackground` |\n| | `drawableTop` | `@drawable/ic_add_favorite` |"]]