bracket_test.xml revision 76b791f78542a2feb191482a2204de95eaf8ee72
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2015 The Android Open Source Project
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  ~      http://www.apache.org/licenses/LICENSE-2.0
8  ~ Unless required by applicable law or agreed to in writing, software
9  ~ distributed under the License is distributed on an "AS IS" BASIS,
10  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11  ~ See the License for the specific language governing permissions and
12  ~ limitations under the License.
13  -->
14<layout xmlns:android="http://schemas.android.com/apk/res/android">
15    <data>
16        <variable name="array" type="String[]"/>
17        <variable name="sparseArray" type="android.util.SparseArray&lt;String>"/>
18        <variable name="sparseBooleanArray" type="android.util.SparseBooleanArray"/>
19        <variable name="sparseIntArray" type="android.util.SparseIntArray"/>
20        <variable name="sparseLongArray" type="android.util.SparseLongArray"/>
21        <variable name="longSparseArray" type="android.util.LongSparseArray&lt;String>"/>
22        <variable name="index" type="int"/>
23        <variable name="indexObj" type="Object"/>
24        <variable name="obj" type="android.databinding.testapp.vo.BracketObject"/>
25    </data>
26    <LinearLayout
27            android:layout_width="match_parent"
28            android:layout_height="match_parent"
29            android:orientation="vertical"
30            >
31        <TextView android:layout_width="wrap_content"
32                  android:layout_height="wrap_content"
33                  android:id="@+id/arrayText"
34                  android:text="@{array[index]}"/>
35
36        <TextView android:layout_width="wrap_content"
37                  android:layout_height="wrap_content"
38                  android:id="@+id/indexObj"
39                  android:text="@{array[indexObj]}"/>
40
41        <TextView android:layout_width="wrap_content"
42                  android:layout_height="wrap_content"
43                  android:id="@+id/sparseArrayText"
44                  android:text='@{sparseArray[index]}'/>
45
46        <TextView android:layout_width="wrap_content"
47                  android:layout_height="wrap_content"
48                  android:id="@+id/sparseArrayTextObj"
49                  android:text='@{sparseArray[indexObj]}'/>
50
51        <TextView android:layout_width="wrap_content"
52                  android:layout_height="wrap_content"
53                  android:id="@+id/sparseBooleanArrayText"
54                  android:text='@{"" + sparseBooleanArray[index]}'/>
55
56        <TextView android:layout_width="wrap_content"
57                  android:layout_height="wrap_content"
58                  android:id="@+id/sparseIntArrayText"
59                  android:text='@{"" + sparseIntArray[index]}'/>
60
61        <TextView android:layout_width="wrap_content"
62                  android:layout_height="wrap_content"
63                  android:id="@+id/sparseLongArrayText"
64                  android:text='@{"" + sparseLongArray[index]}'/>
65
66        <TextView android:layout_width="wrap_content"
67                  android:layout_height="wrap_content"
68                  android:id="@+id/longSparseArrayText"
69                  android:text='@{longSparseArray[index]}'/>
70
71        <TextView android:layout_width="wrap_content"
72                  android:layout_height="wrap_content"
73                  android:id="@+id/bracketMap"
74                  android:text='@{obj.map["Hello"]}'/>
75    </LinearLayout>
76</layout>
77