ตั้งแต่วันที่ 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
Component [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 |
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","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-27 UTC"],[],[],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` |"]]