| 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 |
xmlns:app="http://schemas.android.com/apk/res-auto"> |
| 16 |
<data> |
| 17 |
<variable name="obj" type="android.databinding.testapp.vo.FindMethodBindingObject"/> |
| 18 |
<import type="android.databinding.testapp.vo.FindMethodBindingObject.Bar"/> |
| 19 |
<variable name="obj2" type="Bar<String>"/> |
| 20 |
<import type="android.databinding.testapp.vo.FindMethodBindingObject"/> |
| 21 |
<import type="android.databinding.testapp.vo.FindMethodBindingObject" alias="FMBO"/> |
| 22 |
</data> |
| 23 |
<LinearLayout |
| 24 |
android:orientation="vertical" |
| 25 |
android:layout_width="match_parent" |
| 26 |
android:layout_height="match_parent"> |
| 27 |
<TextView |
| 28 |
android:id="@+id/textView0" |
| 29 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 30 |
android:text="@{obj.method(1)}"/> |
| 31 |
<TextView |
| 32 |
android:id="@+id/textView1" |
| 33 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 34 |
android:text="@{obj.method(1.25f)}"/> |
| 35 |
<TextView |
| 36 |
android:id="@+id/textView2" |
| 37 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 38 |
android:text="@{obj.method(`hello`)}"/> |
| 39 |
<TextView |
| 40 |
android:id="@+id/textView3" |
| 41 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 42 |
android:text="@{obj.method((java.lang.Integer) 1)}"/> |
| 43 |
<TextView |
| 44 |
android:id="@+id/textView4" |
| 45 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 46 |
android:text="@{obj.inheritedMethod()}"/> |
| 47 |
<TextView |
| 48 |
android:id="@+id/textView5" |
| 49 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 50 |
android:text="@{obj.inheritedMethod(2)}"/> |
| 51 |
<TextView |
| 52 |
android:id="@+id/textView6" |
| 53 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 54 |
android:text="@{obj.method()}"/> |
| 55 |
<TextView |
| 56 |
android:id="@+id/textView7" |
| 57 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 58 |
android:text="@{android.databinding.testapp.vo.FindMethodBindingObject.staticMethod()}"/> |
| 59 |
<TextView |
| 60 |
android:id="@+id/textView8" |
| 61 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 62 |
android:text="@{android.databinding.testapp.vo.FindMethodBindingObject.foo.bar}"/> |
| 63 |
<TextView |
| 64 |
android:id="@+id/textView9" |
| 65 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 66 |
android:text="@{FindMethodBindingObject.staticMethod()}"/> |
| 67 |
<TextView |
| 68 |
android:id="@+id/textView10" |
| 69 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 70 |
android:text="@{FindMethodBindingObject.foo.bar}"/> |
| 71 |
<TextView |
| 72 |
android:id="@+id/textView11" |
| 73 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 74 |
android:text="@{FMBO.staticMethod()}"/> |
| 75 |
<TextView |
| 76 |
android:id="@+id/textView12" |
| 77 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 78 |
android:text="@{FMBO.foo.bar}"/> |
| 79 |
<!-- The following are just to test duplicate expressions --> |
| 80 |
<TextView |
| 81 |
android:id="@+id/textView13" |
| 82 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 83 |
android:text="@{FMBO.staticMethod()}"/> |
| 84 |
<TextView |
| 85 |
android:id="@+id/textView14" |
| 86 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 87 |
android:text="@{FMBO.foo.bar}"/> |
| 88 |
<!-- Imported classes --> |
| 89 |
<TextView |
| 90 |
android:id="@+id/textView15" |
| 91 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 92 |
android:text="@{obj2.method(`hello`)}"/> |
| 93 |
<!-- confusing parameters may interfere with compile step --> |
| 94 |
<TextView |
| 95 |
android:id="@+id/textView16" |
| 96 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 97 |
android:text="@{obj.confusingPrimitive((Integer)1)}"/> |
| 98 |
<TextView |
| 99 |
android:id="@+id/textView17" |
| 100 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 101 |
android:text="@{`` + (obj.confusingPrimitive(2) / 2)}"/> |
| 102 |
<TextView |
| 103 |
android:id="@+id/textView18" |
| 104 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 105 |
android:text="@{obj.confusingInheritance(`hello`)}"/> |
| 106 |
<TextView |
| 107 |
android:id="@+id/textView19" |
| 108 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 109 |
android:text="@{obj.confusingTypeArgs(obj.getMap())}"/> |
| 110 |
<TextView |
| 111 |
android:id="@+id/textView20" |
| 112 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 113 |
android:text="@{obj.confusingParam(`hello`)}"/> |
| 114 |
<TextView |
| 115 |
android:id="@+id/textView21" |
| 116 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 117 |
android:text="@{obj.getList()[0]}"/> |
| 118 |
<TextView |
| 119 |
android:id="@+id/textView22" |
| 120 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 121 |
android:text="@{`` + obj.getArray().length}"/> |
| 122 |
<TextView |
| 123 |
android:id="@+id/textView23" |
| 124 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 125 |
android:text="@{FMBO.Foo.baz}"/> |
| 126 |
<TextView |
| 127 |
android:id="@+id/textView24" |
| 128 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 129 |
android:text="@{String.format(`%s`, `Hello World`)}"/> |
| 130 |
<TextView |
| 131 |
android:id="@+id/textView25" |
| 132 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 133 |
android:text="@{obj.myField}"/> |
| 134 |
<TextView |
| 135 |
android:id="@+id/textView26" |
| 136 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 137 |
android:text="@{obj.observableClass.x}"/> |
| 138 |
<TextView |
| 139 |
android:id="@+id/textView27" |
| 140 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 141 |
app:tag="@{1}"/> |
| 142 |
<TextView |
| 143 |
android:id="@+id/textView28" |
| 144 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 145 |
android:text="@{`` + ((Integer)obj.argsClose(1, 2))}" |
| 146 |
/> |
| 147 |
<TextView |
| 148 |
android:id="@+id/textView29" |
| 149 |
android:layout_width="wrap_content" android:layout_height="wrap_content" |
| 150 |
android:text="@{`` + ((Integer)obj.argsClose(10, `Hello World`))}" |
| 151 |
/> |
| 152 |
</LinearLayout> |
| 153 |
</layout> |