จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สไลซ์
แสดงองค์ประกอบ UI เทมเพลตภายนอกแอป
อัปเดตล่าสุด |
รุ่นที่เสถียร |
รุ่นที่อาจได้รับการเผยแพร่ |
รุ่นเบต้า |
รุ่นอัลฟ่า |
13 มกราคม 2021 |
- |
- |
- |
1.1.0-alpha02 |
ความคิดเห็น
ความคิดเห็นของคุณช่วยปรับปรุง Jetpack ให้ดียิ่งขึ้น โปรดแจ้งให้เราทราบหากพบปัญหาใหม่หรือมีแนวคิดในการปรับปรุงคลังนี้ โปรดดูปัญหาที่มีอยู่ในคลังนี้ก่อนสร้างปัญหาใหม่ คุณสามารถเพิ่มการโหวตให้กับปัญหาที่มีอยู่ได้โดยคลิกปุ่มดาว
สร้างรายการใหม่
ดูข้อมูลเพิ่มเติมในเอกสารประกอบของเครื่องมือติดตามปัญหา
เวอร์ชัน 1.1.0
เวอร์ชัน 1.1.0-alpha02
13 มกราคม 2021
ปล่อย androidx.slice:slice-builders:1.1.0-alpha02
, androidx.slice:slice-core:1.1.0-alpha02
และ androidx.slice:slice-view:1.1.0-alpha02
แล้ว เวอร์ชัน 1.1.0-alpha02 มีการคอมมิตเหล่านี้
การเปลี่ยนแปลง API
- รองรับเครื่องมือเลือกในการดำเนินการกับส่วนต่างๆ ในมุมมองแถว (I4d965)
- การรองรับ SliceAction สําหรับ GridRow (Ie289b)
- เพิ่มข้อความเครื่องมือเลือกเวลา ซึ่งจะสร้างกล่องโต้ตอบเครื่องมือเลือกเวลาหรือเครื่องมือเลือกวันที่เมื่อแตะ (I07deb)
- แก้ไขข้อผิดพลาด Treehug (I416cc)
- เพิ่ม
ListBuilder.StarRatingBuilder
ซึ่งเป็นแถวที่รองรับการป้อนการให้ดาวสำหรับข้อมูลพร็อพเพอร์ตี้ (I25aec)
- แทนที่
ListBuilder#setHostExtra
ด้วย ListBuilder#setHostExtras
เพื่อยอมรับกลุ่ม (I43ec7, b/)
- เพิ่ม API ใหม่
ListBuilder#setHostExtra
และ SliceMetadata#getHostExtras
เพื่อบันทึกและดึงข้อมูลเพิ่มเติมสำหรับโฮสต์จากข้อมูลส่วน (Ib0768, b/)
- เพิ่ม API ใหม่สําหรับ RowBuilder เพื่อระบุส่วนท้ายของส่วนและแสดงตัวแบ่งบรรทัดล่าง (I23ddd, b/)
- เพิ่มการกำกับเนื้อหาเกี่ยวกับความสามารถในการเป็นค่าว่างในเครื่องมือสร้างข้อมูลโค้ดเพื่อการทำงานร่วมกันของ Kotlin ที่ดีขึ้น (If00f1, b/166489398)
- เพิ่ม
CellBuilder.addOverlayText
ซึ่งวางซ้อนข้อความบนรูปภาพในเซลล์ (I09d97)
- เพิ่มแอตทริบิวต์ imageCornerRadius สำหรับการใช้มุมมนกับรูปภาพ/ไอคอน
SliceHints.LARGE_IMAGE
(I3e8f8)
- กำหนดให้
configureViewPolicy
เป็น protected แทนที่จะเป็น private เพื่อให้เรียกจากคลาสย่อยได้ (I6772b)
- รองรับรูปภาพ RAW ในมุมมองตารางกริดที่มีการปรับขนาดสำหรับรูปภาพแนวตั้งและแนวนอน (I925fb)
- เพิ่ม API ใหม่
SliceView#getNumberOfHiddenItems
เพื่อรับจำนวนรายการส่วนที่ไม่พอดีกับมุมมอง (I09651)
- เพิ่ม
SliceView#setRowStyleFactory
เพื่ออนุญาตให้โฮสต์ของ Slice ปรับแต่งรูปแบบของแต่ละแถวตามข้อมูลเมตาของ Slice (Ia8f2e)
แก้ไขข้อบกพร่อง
- แก้ไขการดําเนินการของส่วนเครื่องมือเลือกในแถวตารางกริดเป็นรายการเดียว (I3d899)
การสนับสนุนภายนอก
- เปิดใช้การตรวจสอบ Lint ของ API สําหรับ StaticFinalBuilder สําหรับ androidx (I2b11b, b/138602561)
Slice-Builders-Ktx เวอร์ชัน 1.0.0-alpha08
13 มกราคม 2021
androidx.slice:slice-builders-ktx:1.0.0-alpha08
ได้รับการปล่อยแล้ว เวอร์ชัน 1.0.0-alpha08 มีคอมมิตเหล่านี้
อัปเดตให้ใช้ slice-builders 1.1.0-alpha02
เวอร์ชัน 1.1.0-alpha01
7 พฤษภาคม 2019
ปล่อย androidx.slice:slice-builders:1.1.0-alpha01
, androidx.slice:slice-builders-ktx:1.0.0-alpha07
, androidx.slice:slice-core:1.1.0-alpha01
และ androidx.slice:slice-view:1.1.0-alpha01
แล้ว ดูคอมมิตที่รวมอยู่ในเวอร์ชันนี้ได้ที่นี่
ฟีเจอร์ใหม่
- ลบล้าง
onCreatePermissionRequest
ใน SliceProvider
ได้เพื่อปรับแต่งลักษณะการให้สิทธิ์
แก้ไขข้อบกพร่อง
- แก้ไข OnSliceActionListener ไม่ได้รับคําเรียกเมื่อมีการคลิกรายการแถวที่มีการดำเนินการเพียงรายการเดียว
- SliceView ที่แก้ไขแล้วไม่ทำตามพารามิเตอร์การออกแบบ MeasureSpec.EXACTLY
- แก้ไข onClick ที่ซ้ำกันระหว่าง onLongClick ใน SliceView
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา 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,["# Slice\n=====\n\n[User Guide](/guide/slices) [Code Sample](https://github.com/android/user-interface-samples) \nAPI Reference \n[androidx.slice](/reference/kotlin/androidx/slice/package-summary) \n[androidx.slice.builders](/reference/kotlin/androidx/slice/builders/package-summary) \n[androidx.slice.core](/reference/kotlin/androidx/slice/core/package-summary) \n[androidx.slice.widget](/reference/kotlin/androidx/slice/widget/package-summary) \nDisplay templated UI elements outside your app. \n\n| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |\n|------------------|----------------|-------------------|--------------|-----------------------------------------------------------------|\n| January 13, 2021 | - | - | - | [1.1.0-alpha02](/jetpack/androidx/releases/slice#1.1.0-alpha02) |\n\nFeedback\n--------\n\nYour feedback helps make Jetpack better. Let us know if you discover new issues or have\nideas for improving this library. Please take a look at the\n[existing issues](https://issuetracker.google.com/issues?q=componentid:460783%20status:open)\nin this library before you create a new one. You can add your vote to an existing issue by\nclicking the star button.\n\n[Create a new issue](https://issuetracker.google.com/issues/new?component=460783&template=1422470)\n\nSee the [Issue Tracker documentation](https://developers.google.com/issue-tracker)\nfor more information.\n\nVersion 1.1.0\n-------------\n\n### Version 1.1.0-alpha02\n\nJanuary 13, 2021\n\n`androidx.slice:slice-builders:1.1.0-alpha02`, `androidx.slice:slice-core:1.1.0-alpha02`, and `androidx.slice:slice-view:1.1.0-alpha02` are released. [Version 1.1.0-alpha02 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/557d5e4baea877324ddd0d6b9f2b969f080a8b7b..6207afb1646d302c5d29c2c67d332b48db87fb27/slices)\n\n**API Changes**\n\n- Support pickers in slice actions in row view ([I4d965](https://android-review.googlesource.com/#/q/I4d96578848f48d3144d479d8d1d272dc6b0b5876))\n- SliceAction support for GridRow ([Ie289b](https://android-review.googlesource.com/#/q/Ie289bc3ae250ee3eca27e0e659181e71f59db9a6))\n- Added Time picker text, which creates a time picker or date picker dialog when tapped. ([I07deb](https://android-review.googlesource.com/#/q/I07debf8131466cf9e0488a981497d29001257d23))\n- Fixed an issue for Treehug error ([I416cc](https://android-review.googlesource.com/#/q/I416ccc8be568a76bc2bf3c9c9a7a590c5f65c77e))\n- Added `ListBuilder.StarRatingBuilder`, which is a row that supports star rating inputs for slices. ([I25aec](https://android-review.googlesource.com/#/q/I25aecc9907f0fea3842f0b29083da1b0d956ff5f))\n- Replaced `ListBuilder#setHostExtra` with `ListBuilder#setHostExtras` to accept a bundle ([I43ec7](https://android-review.googlesource.com/#/q/I43ec7ce94b46468c64a542d1b14f2e908e4751bb), [b/](https://issuetracker.google.com/issues/))\n- Added new API `ListBuilder#setHostExtra` and `SliceMetadata#getHostExtras` to save and extract additional information for the host from slice. ([Ib0768](https://android-review.googlesource.com/#/q/Ib07683a36ee66e722af0bc873837fdc373c5905f), [b/](https://issuetracker.google.com/issues/))\n- Added new API for RowBuilder to indicate end of a section and show bottom line divider. ([I23ddd](https://android-review.googlesource.com/#/q/I23ddd4d4377ec6273b49414d3323afb275f33e05), [b/](https://issuetracker.google.com/issues/))\n- Add nullabilities annotation in slice builders for better kotlin interop. ([If00f1](https://android-review.googlesource.com/#/q/If00f14006017c097853a766c89f03f7530f1841d), [b/166489398](https://issuetracker.google.com/issues/166489398))\n- Added `CellBuilder.addOverlayText`, which overlays text on the image in the cell. ([I09d97](https://android-review.googlesource.com/#/q/I09d9731c3c2dfef57383161cb4f757dfe99e1d06))\n- Added imageCornerRadius attribute for applying rounded corners to `SliceHints.LARGE_IMAGE` images/icons. ([I3e8f8](https://android-review.googlesource.com/#/q/I3e8f85bd415a4fa9a35da55733ee75c36bfd8b08))\n- Make `configureViewPolicy` protected instead of private so it can be called from subclasses. ([I6772b](https://android-review.googlesource.com/#/q/I6772b328f34d4b38e2be7d3b2c6b563467860cd0))\n- Support raw images in gridrow view being sized for portrait and landscape images. ([I925fb](https://android-review.googlesource.com/#/q/I925fb349bb8382d7618652517cc2ad98ace3abd9))\n- Added a new API `SliceView#getNumberOfHiddenItems` to obtain the number of slice items that didn't fit into the view. ([I09651](https://android-review.googlesource.com/#/q/I09651e769b15087364f50a32c3d1ee00bfeee25e))\n- Added `SliceView#setRowStyleFactory` to allow slice hosts to customize the style of each row based on slice metadata. ([Ia8f2e](https://android-review.googlesource.com/#/q/Ia8f2ed86af99d58b7d89616899d0bf1f90de70c4))\n\n**Bug Fixes**\n\n- Fix Picker Slice action on Gridrow as only item ([I3d899](https://android-review.googlesource.com/#/q/I3d8993aa9fdedfd6a2418cc69c09619459710d2e))\n\n**External Contribution**\n\n- API lint check for the StaticFinalBuilder is enabled for androidx ([I2b11b](https://android-review.googlesource.com/#/q/I2b11be1bb370e178e3e0d1d1083d43af38eece23), [b/138602561](https://issuetracker.google.com/issues/138602561))\n\n### Slice-Builders-Ktx Version 1.0.0-alpha08\n\nJanuary 13, 2021\n\n`androidx.slice:slice-builders-ktx:1.0.0-alpha08` is released. [Version 1.0.0-alpha08 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/557d5e4baea877324ddd0d6b9f2b969f080a8b7b..6207afb1646d302c5d29c2c67d332b48db87fb27/slices/builders/ktx)\n\nUpdated to depend on slice-builders 1.1.0-alpha02.\n\n### Version 1.1.0-alpha01\n\nMay 7, 2019\n\n`androidx.slice:slice-builders:1.1.0-alpha01`, `androidx.slice:slice-builders-ktx:1.0.0-alpha07`, `androidx.slice:slice-core:1.1.0-alpha01`, and `androidx.slice:slice-view:1.1.0-alpha01` are released. The commits included in this version can be found [here](https://android.googlesource.com/platform/frameworks/support/+log/50a39caa72955aae0c75225fd9805ab537cbf049..557d5e4baea877324ddd0d6b9f2b969f080a8b7b/slices).\n\n**New features**\n\n- `onCreatePermissionRequest` can be overridden in `SliceProvider` to customize the permission grant behavior\n\n**Bug fixes**\n\n- Fixed OnSliceActionListener was not getting called when a row item with only one action was clicked\n- Fixed SliceView has not respecting MeasureSpec.EXACTLY layout params\n- Fixed duplicate onClick during onLongClick on SliceView"]]