<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<resources>

    <!-- Adapter used to bind cursors. -->
    <declare-styleable name="CursorAdapter">
        <!-- URI to get the cursor from. Optional. -->
        <attr name="uri" format="string" />
        <!-- Selection statement for the query. Optional. -->
        <attr name="selection" format="string" />
        <!-- Sort order statement for the query. Optional. -->
        <attr name="sortOrder" format="string" />
        <!-- Layout resource used to display each row from the cursor. Mandatory. -->
        <attr name="layout" format="reference" />
    </declare-styleable>

    <!-- Attributes used in bind items for XML cursor adapters. -->
    <declare-styleable name="CursorAdapter_BindItem">
        <!-- The name of the column to bind from. Mandatory. -->
        <attr name="from" format="string" />
        <!-- The resource id of the view to bind to. Mandatory. -->
        <attr name="to" format="reference" />
        <!-- The type of binding. If this value is not specified, the type will be
             inferred from the type of the "to" target view. Mandatory.

             The type can be one of:
             <ul>
             <li>string, The content of the column is interpreted as a string.</li>
             <li>image, The content of the column is interpreted as a blob describing an image.</li>
             <li>image-uri, The content of the column is interpreted as a URI to an image.</li>
             <li>drawable, The content of the column is interpreted as a resource id to a drawable.</li>
             <li>A fully qualified class name, corresponding to an implementation of
                 android.widget.Adapters.CursorBinder.</li>
             </ul>
         -->
        <attr name="as" format="string" />
    </declare-styleable>

    <!-- Attributes used in select items for XML cursor adapters.-->
    <declare-styleable name="CursorAdapter_SelectItem">
        <!-- The name of the column to select. Mandatory. -->
        <attr name="column" format="string" />
    </declare-styleable>

    <!-- Attributes used to map values to new values in XML cursor adapters' bind items. -->
    <declare-styleable name="CursorAdapter_MapItem">
        <!-- The original value from the column. Mandatory. -->
        <attr name="fromValue" format="string" />
        <!-- The new value from the column. Mandatory. -->
        <attr name="toValue" format="string" />
    </declare-styleable>

    <!-- Attributes used to map values to new values in XML cursor adapters' bind items. -->
    <declare-styleable name="CursorAdapter_TransformItem">
        <!-- The transformation expression. Mandatory if "withClass" is not specified. -->
        <attr name="withExpression" format="string" />
        <!-- The transformation class, an implementation of
             android.widget.Adapters.CursorTransformation. Mandatory if "withExpression"
             is not specified. -->
        <attr name="withClass" format="string" />
    </declare-styleable>

</resources>