android cardview
2015-12-25 16:53
417 查看
public class CardView extends FrameLayout implements CardViewDelegate
添加 的特殊属性
* @attr ref android.support.v7.cardview.R.styleable#CardView_cardBackgroundColor * @attr ref android.support.v7.cardview.R.styleable#CardView_cardCornerRadius * @attr ref android.support.v7.cardview.R.styleable#CardView_cardElevation * @attr ref android.support.v7.cardview.R.styleable#CardView_cardMaxElevation * @attr ref android.support.v7.cardview.R.styleable#CardView_cardUseCompatPadding * @attr ref android.support.v7.cardview.R.styleable#CardView_cardPreventCornerOverlap * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPadding * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPaddingLeft * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPaddingTop * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPaddingRight * @attr ref android.support.v7.cardview.R.styleable#CardView_contentPaddingBottom
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.andyidea.guidedemo.RecycleViewActivity"> <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="match_parent" android:contextClickable="false" android:elevation="5dp" android:focusable="true" app:contentPadding="10dp" app:cardCornerRadius="8dp"> <android.support.v7.widget.RecyclerView android:id="@+id/rv" android:layout_width="match_parent" android:layout_height="match_parent" android:elevation="10dp"></android.support.v7.widget.RecyclerView> </android.support.v7.widget.CardView> </RelativeLayout>
使用特殊属性
app:contentPadding=”10dp”
app:cardCornerRadius=”8dp”
相关文章推荐
- Ubuntu下为AndroidStudio编译并使用x264(二)AndroidStudio部分
- android图片压缩质量参数Bitmap.Config RGB_565等的含义
- android viewgroup 的事件传递机制学习笔记
- Android获取屏幕宽度与长度的四个方法
- Android Studio系列教程(二)
- Ubuntu下为AndroidStudio编译并使用x264(一)ndk部分
- Android应用开发系列——星座达人①
- android view的事件传递机制学习笔记
- android 添加前景色
- Android中零碎的问题
- Windows下简易Jenkins构建Android自动打包 - Ant
- Android 使用BroadcastReceiver的几种方法
- Android中callback(接口回调)机制
- android studio 新建工程一直显示resolve dependence
- 一张图片让你了解android的事件分发机制
- Android Studio简单设置
- Android Studio系列教程(一)
- Android EditText输入光标居于开头最开始位置
- Android Studio基础之编译JNI(七)-学习篇
- android bitmap 大小获取