<commit_before>import QtQuick 2.0
import QuickAndroid 0.1
import QuickAndroid.Styles 0.1
import "../theme"

Activity {
    actionBar: ActionBar {
        title: "Image Picker Demo"
        onActionButtonClicked: back();
    }

    ImagePicker {
        id: imagePicker;
        multiple : true
    }

    Rectangle {
        anchors.fill: parent
        color: Constants.black100

        Image {
            anchors.fill: parent
            source: imagePicker.imageUrl
            fillMode: Image.PreserveAspectFit
        }

        Column {
            anchors.right: parent.right
            anchors.rightMargin: 16 * A.dp
            anchors.bottom: parent.bottom
            anchors.bottomMargin: 32 * A.dp

            spacing: 16 * A.dp

            FloatingActionButton {
                iconSource: A.drawable("ic_camera",Constants.black87);
                size: Constants.small
                color: Constants.white100
                onClicked: {
                    imagePicker.takePhoto();
                }<commit_msg>ImagePickerDemo.qml : If multiple images are picked, show it in grid.<commit_after>import QtQuick 2.0
import QuickAndroid 0.1
import QuickAndroid.Styles 0.1
import "../theme"

Activity {
    id: demo
    actionBar: ActionBar {
        title: "Image Picker Demo"
        onActionButtonClicked: back();
    }

    ImagePicker {
        id: imagePicker;
        multiple : true
    }

    Rectangle {
        anchors.fill: parent
        color: Constants.black100

        Image {
            id: image
            anchors.fill: parent
            source: imagePicker.imageUrl
            fillMode: Image.PreserveAspectFit
            visible: imagePicker.imageUrls.length <= 1
        }

        Grid {
            columns: 3
            spacing: 0
            visible: !image.visible

            Repeater {
                model: imagePicker.imageUrls
                delegate: Image {
                    width: demo.width / 3
                    height: width / 4 * 3
                    source: modelData
                    asynchronous: true
                    fillMode: Image.PreserveAspectCrop
                }
            }
        }

        Column {
            anchors.right: parent.right
            anchors.rightMargin: 16 * A.dp
            anchors.bottom: parent.bottom
            anchors.bottomMargin: 32 * A.dp

            spacing: 16 * A.dp

            FloatingActionButton {
                iconSource: A.drawable("ic_camera",Constants.black87);
                size: Constants.small
                color: Constants.white100
                onClicked: {
                    imagePicker.takePhoto();
                }
{'fraction_non_alphanumeric': 0.07284273440418379, 'fraction_numerical': 0.017183414269704895, 'mean_word_length': 1.3636363636363635, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1562473', 'n_tokens_mistral': 748, 'n_tokens_neox': 680, 'n_words': 161}