• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<resources>
3    <attr format="reference" name="cardViewStyle"/>
4    <color name="cardview_dark_background">#FF424242</color>
5    <color name="cardview_light_background">#FFFFFFFF</color>
6    <color name="cardview_shadow_end_color">#03000000</color>
7    <color name="cardview_shadow_start_color">#37000000</color>
8    <declare-styleable name="CardView">
9        <!-- Background color for CardView. -->
10        <attr format="color" name="cardBackgroundColor"/>
11        <!-- Corner radius for CardView. -->
12        <attr format="dimension" name="cardCornerRadius"/>
13        <!-- Elevation for CardView. -->
14        <attr format="dimension" name="cardElevation"/>
15        <!-- Maximum Elevation for CardView. -->
16        <attr format="dimension" name="cardMaxElevation"/>
17        <!-- Add padding in API v21+ as well to have the same measurements with previous versions. -->
18        <attr format="boolean" name="cardUseCompatPadding"/>
19        <!-- Add padding to CardView on v20 and before to prevent intersections between the Card content and rounded corners. -->
20        <attr format="boolean" name="cardPreventCornerOverlap"/>
21        <!-- Inner padding between the edges of the Card and children of the CardView. -->
22        <attr format="dimension" name="contentPadding"/>
23        <!-- Inner padding between the left edge of the Card and children of the CardView. -->
24        <attr format="dimension" name="contentPaddingLeft"/>
25        <!-- Inner padding between the right edge of the Card and children of the CardView. -->
26        <attr format="dimension" name="contentPaddingRight"/>
27        <!-- Inner padding between the top edge of the Card and children of the CardView. -->
28        <attr format="dimension" name="contentPaddingTop"/>
29        <!-- Inner padding between the bottom edge of the Card and children of the CardView. -->
30        <attr format="dimension" name="contentPaddingBottom"/>
31        <!-- Workaround to read user defined minimum width -->
32        <attr name="android:minWidth"/>
33        <!-- Workaround to read user defined minimum height -->
34        <attr name="android:minHeight"/>
35    </declare-styleable>
36    <dimen name="cardview_compat_inset_shadow">1dp</dimen>
37    <dimen name="cardview_default_elevation">2dp</dimen>
38    <dimen name="cardview_default_radius">2dp</dimen>
39    <style name="Base.CardView" parent="android:Widget">
40        <item name="cardCornerRadius">@dimen/cardview_default_radius</item>
41        <item name="cardElevation">@dimen/cardview_default_elevation</item>
42        <item name="cardMaxElevation">@dimen/cardview_default_elevation</item>
43        <item name="cardUseCompatPadding">false</item>
44        <item name="cardPreventCornerOverlap">true</item>
45    </style>
46    <style name="CardView" parent="Base.CardView">
47    </style>
48    <style name="CardView.Dark">
49        <item name="cardBackgroundColor">@color/cardview_dark_background</item>
50    </style>
51    <style name="CardView.Light">
52        <item name="cardBackgroundColor">@color/cardview_light_background</item>
53    </style>
54</resources>