国家公务员考试简章,法式衬衣,女护士献身捐精者视频
首先上图:
我们可以看到上面这个我所编写的界面上,战狼这一个模块则使用了cardview控件,下面我们来看看它是怎么使用的:
这里是cardview在线性布局下的的布局代码:
<android.support.v7.widget.cardview android:id="@+id/cv3" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" app:cardbackgroundcolor="#c4c6c8" app:cardcornerradius="10dp" app:cardelevation="10dp" app:cardpreventcorneroverlap="true" app:layout_constrainttop_totopof="parent"> <imageview android:layout_width="160dp" android:layout_height="80dp" android:src="@drawable/timg" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margintop="10dp" android:layout_marginleft="170dp" android:textcolor="#000000" android:text="战狼2" android:textsize="20sp"/> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="170dp" android:text="感受中华民族的崛起!为中华复兴而奋斗!" android:textcolor="#000000" android:layout_margintop="40dp"/> </android.support.v7.widget.cardview>
十分容易就可以搞定了,但是不要忘记了需要在build.gradle文件下使用我们引入的库哈:
implementation'com.android.support:cardview-v7:28.0.0'
上面这行代码是必不可少的啦!
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Android apk 项目一键打包并上传到蒲公英的实现方法
Android 自定义LineLayout实现满屏任意拖动功能的示例代码
android 限制某个操作每天只能操作指定的次数(示例代码详解)
Android 集成 google 登录并获取性别等隐私信息的实现代码
网友评论