当前位置:网站首页>Cardview usage and properties
Cardview usage and properties
2022-06-10 13:30:00 【yechaoa】
Very simple to use , Not many attributes , There are few commonly used , It comes with shadows and rounded corners
compile 'com.android.support:cardview-v7:25.3.1'<android.support.v7.widget.CardView
android:id="@+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:foreground="?android:attr/selectableItemBackground"
app:cardBackgroundColor="#1296db"
app:cardCornerRadius="10dp"
app:cardElevation="10dp"
app:contentPadding="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/card_view"
android:textColor="#fff"/>
</android.support.v7.widget.CardView>Two common attributes :
app:cardBackgroundColor Set the background color
app:contentPadding Set contents padding
other :
app:cardCornerRadius This is to set the fillet size app:cardElevation This is the setup z The shadow of the axis app:cardMaxElevation This is the setup z The maximum height of the shaft app:cardUseCompatPadding Whether to use CompatPadding app:cardPreventCornerOverlap Whether to use PreventCornerOverlap app:contentPaddingLeft Set the left side of the content padding app:contentPaddingTop Set the top of the content padding app:contentPaddingRight Set the right side of the content padding app:contentPaddingBottom Set the bottom of the content padding
边栏推荐
- 10、 Application of state machine model (cellular automata; gdb/rr/perf; code verification tool)
- 将anaconda的bin目录加入PATH
- 'getWidth()' is deprecated,'getHeight()' is deprecated
- Introduction to assembly language - Summary
- 机器学习中训练和验证指标曲线图能告诉我们什么?
- win10虚拟机下载安装流程
- Neuron Newsletter 2022-05|新增 2 个南向驱动和 1 个北向应用、Modbus TCP 实现定制扩展
- 学籍管理系统
- [Multisim Simulation] differential amplifier circuit 2
- Leetcode 96. 不同的二叉搜索樹
猜你喜欢

Multithreading killer ---countdownlatch & cyclicbarrier

解决VMware Workstation安装VMware Tools显示灰色的办法
![buuctf [PHP]inclusion](/img/02/d328ed84e4641c09c5b1eba3ac6ea9.png)
buuctf [PHP]inclusion

Comprehensive training of large projects

3. 网页开发工具 VS Code

client-go gin的简单整合六-list-watch二(关于Rs与Pod以及Deployment的完善)

Google Earth Engine(GEE)——基于s2影像的实时全球10米土地利用/土地覆盖(LULC)数据集

Development trend of Web Development

H. 265 introduction to coding principles

Leetcode 96. Different binary search trees
随机推荐
讓資源在雲端和本地自由流動
Ultra detailed ffmpeg installation and simple use tutorial
让资源在云端和本地自由流动
Yyds dry goods inventory # solve the problem of sword finger offer: jump step expansion
Im instant messaging development: the underlying principle of process killed and app skills to deal with killed
数码管驱动芯片+语音芯片的应用场景介绍,WT588E02B-24SS
如果再写for循环,我就锤自己了
12、 Process address space (PMAP; vdso; MMAP)
TextInputLayout使用详解
Shape color gradient, fillet, half fillet, border, fill
buuctf [PHP]inclusion
win10虚拟机下载安装流程
buuctf [PHP]XDebug RCE
CVPR2022|AConvNetforthe2020s&如何设计神经网络总结
Mysql database (26): View
CL210OpenStack操作的故障排除--常见核心问题的故障排除
Let resources flow freely in the cloud and locally
QA of some high frequency problems in oauth2 learning
施一公等团队登Science封面:AI与冷冻电镜揭示「原子级」NPC结构,生命科学突破
How to deal with the interview for the fresh senior graduates who want to self-study software testing?