使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Cardview
用圆角和阴影实现 Material Design 卡片图案。
最近更新时间 |
稳定版 |
候选版 |
Beta 版 |
Alpha 版 |
2018 年 9 月 21 日 |
1.0.0 |
- |
- |
- |
声明依赖项
如需添加 CardView 的依赖项,您必须将 Google Maven 代码库添加到项目中。如需了解详情,请参阅 Google 的 Maven 代码库。
在应用或模块的 build.gradle
文件中添加所需工件的依赖项:
Groovy
dependencies {
implementation "androidx.cardview:cardview:1.0.0"
}
Kotlin
dependencies {
implementation("androidx.cardview:cardview:1.0.0")
}
如需详细了解依赖项,请参阅添加 build 依赖项。
反馈
您的反馈将帮助我们改进 Jetpack。如果您发现了新问题,或对此库有任何改进建议,请告诉我们。创建新问题前,请先查看此库中的现有问题。您可以点击星标按钮,为现有问题投票。
创建新问题
如需了解详情,请参阅问题跟踪器文档。
此工件没有版本说明。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Cardview\n========\n\n[User Guide](/guide/topics/ui/layout/cardview) [Code Sample](https://github.com/android/views-widgets-samples) \nAPI Reference \n[androidx.cardview.widget](/reference/kotlin/androidx/cardview/widget/package-summary) \nImplement the Material Design card pattern with round corners and drop shadows. \n\n| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |\n|--------------------|----------------------------------------------------|-------------------|--------------|---------------|\n| September 21, 2018 | [1.0.0](/jetpack/androidx/releases/cardview#1.0.0) | - | - | - |\n\nDeclaring dependencies\n----------------------\n\nTo add a dependency on CardView, you must add the Google Maven repository to your\nproject. Read [Google's Maven repository](/studio/build/dependencies#google-maven)\nfor more information.\n\nAdd the dependencies for the artifacts you need in the `build.gradle` file for\nyour app or module: \n\n### Groovy\n\n```groovy\ndependencies {\n implementation \"androidx.cardview:cardview:1.0.0\"\n}\n```\n\n### Kotlin\n\n```kotlin\ndependencies {\n implementation(\"androidx.cardview:cardview:1.0.0\")\n}\n```\n\nFor more information about dependencies, see [Add build dependencies](/studio/build/dependencies).\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:460373%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=460373&template=1422417)\n\nSee the [Issue Tracker documentation](https://developers.google.com/issue-tracker)\nfor more information.\n\nThere are no release notes for this artifact."]]