zoukankan      html  css  js  c++  java
  • Material Design CardView

    先初始化 xmlns:card_view="http://schemas.android.com/apk/res-auto"

    card_view:cardElevation   设置阴影

    card_view:cardCornerRadius  设置角度

    card_view:cardBackgroundColor 设置背景色

    card_view:cardUserCompatPadding 设置padding填充在版本L之前和之后的填充效果一致,避免版本L之前会不显示阴影

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:card_view="http://schemas.android.com/apk/res-auto"
            ... >
            <!-- A CardView that contains a TextView -->
        <android.support.v7.widget.CardView
            xmlns:card_view="http://schemas.android.com/apk/res-auto"
            android:id="@+id/card_view"
            android:layout_gravity="center"
            android:layout_width="200dp"
            android:layout_height="200dp"
            card_view:cardElevation="4dp"
            card_view:cardCornerRadius="4dp"
            card_view:cardCornerRadius="4dp" >
        
        <TextView
            android:id="@+id/info_text"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
        </android.support.v7.widget.CardView>
    </LinearLayout>
  • 相关阅读:
    计网 | 文件传输协议
    Java | JDK8 | Integer
    2.项目管理-应用工具
    1.需求管理
    1.短视频运营基础
    10.视频效果---变形稳定器
    9.时间重映射
    8.效果控件之移动&&缩放
    7.标记
    6.子剪辑与合并剪辑
  • 原文地址:https://www.cnblogs.com/rfheh/p/5342043.html
Copyright © 2011-2022 走看看