| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| ~ Copyright (C) 2015 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. |
| --> |
| |
| <layout xmlns:android="http://schemas.android.com/apk/res/android" |
| xmlns:bind="http://schemas.android.com/apk/res-auto"> |
| <data> |
| <variable name="outerObject" type="android.databinding.testapp.vo.NotBindableVo"/> |
| </data> |
| <FrameLayout |
| android:layout_width="match_parent" |
| android:layout_height="match_parent"> |
| <LinearLayout |
| android:orientation="vertical" |
| android:layout_width="match_parent" |
| android:layout_height="match_parent"> |
| <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" |
| android:id="@+id/outerTextView" |
| android:text="@{outerObject.stringValue}"/> |
| <!-- TODO test id collision--> |
| <include layout="@layout/included_layout" android:id="@+id/includedLayout" |
| bind:innerObject="@{outerObject}" |
| bind:innerValue="@{`modified ` + outerObject.intValue}" |
| /> |
| <!-- stick something in the middle that may mess with the tag IDs --> |
| <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" |
| android:text="@{`` + outerObject.intValue}"/> |
| <include layout="@layout/plain_layout" android:id="@+id/plainLayout"/> |
| <include layout="@layout/merge_layout" |
| bind:innerObject="@{outerObject}" |
| bind:innerValue="@{`hello ` + outerObject.intValue}"/> |
| <include layout="@layout/merge_layout" |
| android:id="@+id/secondMerge" |
| bind:innerObject="@{outerObject}" |
| bind:innerValue="@{`goodbye ` + outerObject.intValue}"/> |
| |
| <!-- now a merge within a merge --> |
| <include layout="@layout/merge_containing_merge" |
| android:id="@+id/thirdMerge" |
| bind:innerObject="@{outerObject}" |
| bind:innerValue="@{`third ` + outerObject.intValue}"/> |
| |
| <FrameLayout android:layout_width="wrap_content" |
| android:layout_height="wrap_content"> |
| <!-- an included layout with just an id --> |
| <include android:id="@+id/includedPlainLayout" layout="@layout/plain_layout"/> |
| </FrameLayout> |
| </LinearLayout> |
| </FrameLayout> |
| </layout> |