xref: /aosp_15_r20/development/samples/XmlAdapters/res/values/attrs.xml (revision 90c8c64db3049935a07c6143d7fd006e26f8ecca)
1*90c8c64dSAndroid Build Coastguard Worker<?xml version="1.0" encoding="utf-8"?>
2*90c8c64dSAndroid Build Coastguard Worker<!-- Copyright (C) 2011 The Android Open Source Project
3*90c8c64dSAndroid Build Coastguard Worker
4*90c8c64dSAndroid Build Coastguard Worker     Licensed under the Apache License, Version 2.0 (the "License");
5*90c8c64dSAndroid Build Coastguard Worker     you may not use this file except in compliance with the License.
6*90c8c64dSAndroid Build Coastguard Worker     You may obtain a copy of the License at
7*90c8c64dSAndroid Build Coastguard Worker
8*90c8c64dSAndroid Build Coastguard Worker          http://www.apache.org/licenses/LICENSE-2.0
9*90c8c64dSAndroid Build Coastguard Worker
10*90c8c64dSAndroid Build Coastguard Worker     Unless required by applicable law or agreed to in writing, software
11*90c8c64dSAndroid Build Coastguard Worker     distributed under the License is distributed on an "AS IS" BASIS,
12*90c8c64dSAndroid Build Coastguard Worker     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*90c8c64dSAndroid Build Coastguard Worker     See the License for the specific language governing permissions and
14*90c8c64dSAndroid Build Coastguard Worker     limitations under the License.
15*90c8c64dSAndroid Build Coastguard Worker-->
16*90c8c64dSAndroid Build Coastguard Worker
17*90c8c64dSAndroid Build Coastguard Worker<resources>
18*90c8c64dSAndroid Build Coastguard Worker
19*90c8c64dSAndroid Build Coastguard Worker    <!-- Adapter used to bind cursors. -->
20*90c8c64dSAndroid Build Coastguard Worker    <declare-styleable name="CursorAdapter">
21*90c8c64dSAndroid Build Coastguard Worker        <!-- URI to get the cursor from. Optional. -->
22*90c8c64dSAndroid Build Coastguard Worker        <attr name="uri" format="string" />
23*90c8c64dSAndroid Build Coastguard Worker        <!-- Selection statement for the query. Optional. -->
24*90c8c64dSAndroid Build Coastguard Worker        <attr name="selection" format="string" />
25*90c8c64dSAndroid Build Coastguard Worker        <!-- Sort order statement for the query. Optional. -->
26*90c8c64dSAndroid Build Coastguard Worker        <attr name="sortOrder" format="string" />
27*90c8c64dSAndroid Build Coastguard Worker        <!-- Layout resource used to display each row from the cursor. Mandatory. -->
28*90c8c64dSAndroid Build Coastguard Worker        <attr name="layout" format="reference" />
29*90c8c64dSAndroid Build Coastguard Worker    </declare-styleable>
30*90c8c64dSAndroid Build Coastguard Worker
31*90c8c64dSAndroid Build Coastguard Worker    <!-- Attributes used in bind items for XML cursor adapters. -->
32*90c8c64dSAndroid Build Coastguard Worker    <declare-styleable name="CursorAdapter_BindItem">
33*90c8c64dSAndroid Build Coastguard Worker        <!-- The name of the column to bind from. Mandatory. -->
34*90c8c64dSAndroid Build Coastguard Worker        <attr name="from" format="string" />
35*90c8c64dSAndroid Build Coastguard Worker        <!-- The resource id of the view to bind to. Mandatory. -->
36*90c8c64dSAndroid Build Coastguard Worker        <attr name="to" format="reference" />
37*90c8c64dSAndroid Build Coastguard Worker        <!-- The type of binding. If this value is not specified, the type will be
38*90c8c64dSAndroid Build Coastguard Worker             inferred from the type of the "to" target view. Mandatory.
39*90c8c64dSAndroid Build Coastguard Worker
40*90c8c64dSAndroid Build Coastguard Worker             The type can be one of:
41*90c8c64dSAndroid Build Coastguard Worker             <ul>
42*90c8c64dSAndroid Build Coastguard Worker             <li>string, The content of the column is interpreted as a string.</li>
43*90c8c64dSAndroid Build Coastguard Worker             <li>image, The content of the column is interpreted as a blob describing an image.</li>
44*90c8c64dSAndroid Build Coastguard Worker             <li>image-uri, The content of the column is interpreted as a URI to an image.</li>
45*90c8c64dSAndroid Build Coastguard Worker             <li>drawable, The content of the column is interpreted as a resource id to a drawable.</li>
46*90c8c64dSAndroid Build Coastguard Worker             <li>A fully qualified class name, corresponding to an implementation of
47*90c8c64dSAndroid Build Coastguard Worker                 android.widget.Adapters.CursorBinder.</li>
48*90c8c64dSAndroid Build Coastguard Worker             </ul>
49*90c8c64dSAndroid Build Coastguard Worker         -->
50*90c8c64dSAndroid Build Coastguard Worker        <attr name="as" format="string" />
51*90c8c64dSAndroid Build Coastguard Worker    </declare-styleable>
52*90c8c64dSAndroid Build Coastguard Worker
53*90c8c64dSAndroid Build Coastguard Worker    <!-- Attributes used in select items for XML cursor adapters.-->
54*90c8c64dSAndroid Build Coastguard Worker    <declare-styleable name="CursorAdapter_SelectItem">
55*90c8c64dSAndroid Build Coastguard Worker        <!-- The name of the column to select. Mandatory. -->
56*90c8c64dSAndroid Build Coastguard Worker        <attr name="column" format="string" />
57*90c8c64dSAndroid Build Coastguard Worker    </declare-styleable>
58*90c8c64dSAndroid Build Coastguard Worker
59*90c8c64dSAndroid Build Coastguard Worker    <!-- Attributes used to map values to new values in XML cursor adapters' bind items. -->
60*90c8c64dSAndroid Build Coastguard Worker    <declare-styleable name="CursorAdapter_MapItem">
61*90c8c64dSAndroid Build Coastguard Worker        <!-- The original value from the column. Mandatory. -->
62*90c8c64dSAndroid Build Coastguard Worker        <attr name="fromValue" format="string" />
63*90c8c64dSAndroid Build Coastguard Worker        <!-- The new value from the column. Mandatory. -->
64*90c8c64dSAndroid Build Coastguard Worker        <attr name="toValue" format="string" />
65*90c8c64dSAndroid Build Coastguard Worker    </declare-styleable>
66*90c8c64dSAndroid Build Coastguard Worker
67*90c8c64dSAndroid Build Coastguard Worker    <!-- Attributes used to map values to new values in XML cursor adapters' bind items. -->
68*90c8c64dSAndroid Build Coastguard Worker    <declare-styleable name="CursorAdapter_TransformItem">
69*90c8c64dSAndroid Build Coastguard Worker        <!-- The transformation expression. Mandatory if "withClass" is not specified. -->
70*90c8c64dSAndroid Build Coastguard Worker        <attr name="withExpression" format="string" />
71*90c8c64dSAndroid Build Coastguard Worker        <!-- The transformation class, an implementation of
72*90c8c64dSAndroid Build Coastguard Worker             android.widget.Adapters.CursorTransformation. Mandatory if "withExpression"
73*90c8c64dSAndroid Build Coastguard Worker             is not specified. -->
74*90c8c64dSAndroid Build Coastguard Worker        <attr name="withClass" format="string" />
75*90c8c64dSAndroid Build Coastguard Worker    </declare-styleable>
76*90c8c64dSAndroid Build Coastguard Worker
77*90c8c64dSAndroid Build Coastguard Worker</resources>
78