众所周知,人生是一个漫长的流程,不断克服困难,不断反思前进的过程。在这个过程中会产生很多对于人生的质疑和思考,于是我决定将自己的思考,经验和故事全部分享出来,以此寻找共鸣 !!!
专注于Android/Unity和各种游戏开发技巧,以及各种资源分享(网站、工具、素材、源码、游戏等)
有什么需要欢迎私我,交流群让学习不再孤单。

本文约4千字,新手阅读需要6分钟,复习需要2分钟 【收藏随时查阅不再迷路】
Hello,大家好,我是小空,今天带大家学习了解下CardView。
顾名思义,她是卡片布局,就像扑克牌一样给人很舒服的感觉。
如果你是在稍微老或更老的项目上使用,你就需要依赖下CardView的库,如果你是近期创建的项目,项目默认就已经导入了。
当我们去找到CardView的时候,发现他就是自定义的FrameLayout,官方为我们封装了很多效果实现(包含圆角、阴影)。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:layout_width="100dp"
android:layout_height="100dp"
app:cardBackgroundColor="@color/color_00ff00"
app:cardCornerRadius="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="芝麻粒儿:\n疯狂星期四" />
androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_marginTop="20dp"
app:cardBackgroundColor="@color/color_00ff00"
app:cardCornerRadius="40dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@mipmap/study_six" />
androidx.cardview.widget.CardView>
LinearLayout>

📢作者:小空和小芝中的小空
📢转载说明-务必注明来源:https://zhima.blog.csdn.net/
📢这位道友请留步☁️,我观你气度不凡,谈吐间隐隐有王者霸气💚,日后定有一番大作为📝!!!旁边有点赞👍收藏🌟今日传你,点了吧,未来你成功☀️,我分文不取,若不成功⚡️,也好回来找我。
温馨提示:点击下方卡片获取更多意想不到的资源。
