ImageView

Screenshot

Imageview - Reference - Enaml-native - CodeLV

Example

from enamlnative.core.api import Looper
from enamlnative.widgets.api import *


enamldef ContentView(ScrollView):
    Flexbox:
        flex_direction = "column"
        align_items="stretch"
        justify_content = "flex_start"
        Looper:
            iterable = (
                "https://pixy.org/src/21/219269.jpg",
                "https://pixy.org/src2/600/6007103.jpg",
                "https://pixy.org/src2/609/6093695.jpg",
                "https://pixy.org/src/45/452744.jpg",
                "https://pixy.org/src/15/157866.jpg",
                "https://pixy.org/src/20/200823.jpg"
            )

            ImageView:
                background_color = "black"
                height = "wrap_content"
                src = loop.item
                clickable = True
                clicked :: app.show_toast(loop.item)

Declaration

class enamlnative.widgets.image_view.ImageView(parent=None, **kwargs)[source]

Bases: enamlnative.widgets.view.View

Displays image resources

src

Sets a drawable as the content of this ImageView.

max_height

An optional argument to supply a maximum height for this view.

max_width

An optional argument to supply a maximum width for this view.

proxy

A reference to the ProxyImageView object.

Android Implementation

class enamlnative.android.android_image_view.AndroidImageView[source]

Bases: enamlnative.android.android_view.AndroidView, enamlnative.widgets.image_view.ProxyImageView

An Android implementation of an Enaml ProxyImageView.

widget

A reference to the widget created by the proxy.

manager

A Glide request manager for loading images from urls or files

create_widget()[source]

Create the underlying widget.

No iOS implementation found.