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