-
Notifications
You must be signed in to change notification settings - Fork 376
CardView
ZieIony edited this page Jul 13, 2017
·
3 revisions
A card is nothing more than a layout with certain elevation and corner radius. Carbon doesn't have a CardView widget. Instead it provides a style, which can be used with any layout using style
attribute.
<carbon.widget.FrameLayout
style="@style/carbon_CardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<style name="carbon_CardView" parent="carbon_Layout">
<item name="android:background">?attr/carbon_colorBackground</item>
<item name="carbon_elevation">@dimen/carbon_elevationCard</item>
<item name="carbon_cornerRadius">2dp</item>
<item name="android:layout_margin">@dimen/carbon_marginHalf</item>
</style>
Copyright 2015 Marcin Korniluk 'Zielony'