CardView

Example

from enamlnative.widgets.api import *


enamldef ContentView(Flexbox):
    flex_direction = "column"
    background_color = "#eee"
    CardView: card:
        #: Padding inside card
        #: Border radius
        radius = 3

        #: Elevation or "shadow"
        elevation = 10

        content_padding = (50, 50, 50, 50)

        #: Content is usually a layout container (ie flexbox)
        Flexbox:
            flex_direction = "column"
            align_items = "stretch"
            padding = (50, 50, 50, 50)
            TextView:
                text = "Radius"
            SeekBar:
                progress << int(card.radius)
                progress :: card.radius = int(change['value'])
                max = 500
            TextView:
                text = "Elevation"
            SeekBar:
                progress << int(card.elevation)
                progress :: card.elevation = int(change['value'])
                max = 50

Declaration

class enamlnative.widgets.card_view.CardView(parent=None, **kwargs)[source]

Bases: enamlnative.widgets.frame_layout.FrameLayout

A simple control for displaying read-only text.

elevation

Updates the corner radius of the CardView.

radius

Updates the corner radius of the CardView.

content_padding

Content padding of the CardView.

proxy

A reference to the ProxyCardView object.

Android Implementation

class enamlnative.android.android_card_view.AndroidCardView[source]

Bases: enamlnative.android.android_frame_layout.AndroidFrameLayout, enamlnative.widgets.card_view.ProxyCardView

An Android implementation of an Enaml ProxyCardView.

widget

A reference to the widget created by the proxy.

create_widget()[source]

Create the underlying widget.

No iOS implementation found.