blob: 3158f79a175ddcd0af6daa80bcec01576bd50f9b [file] [log] [blame]
<?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:app="http://schemas.android.com/apk/res-auto">
<data>
<variable name="obj" type="android.databinding.testapp.vo.TwoWayBindingObject"/>
</data>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<CalendarView
android:id="@+id/calendarView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:date="@={obj.date}"
/>
<ListView
android:id="@+id/listView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:selectedItemPosition="@={obj.selectedItemPosition}"
android:adapter="@{obj.adapter}"
/>
<CheckBox
android:id="@+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="@={obj.checked}"
android:text="Check Box"
/>
<NumberPicker
android:id="@+id/numberPicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:value="@={obj.number}"
android:minValue="@{1}"
android:maxValue="@{100}"
/>
<RatingBar
android:id="@+id/ratingBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:rating="@={obj.rating}"
android:numStars="5"
/>
<SeekBar
android:id="@+id/seekBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:max="100"
android:progress="@={obj.progress}"
/>
<TabHost
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:currentTab="@={obj.currentTab}">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:id="@+id/foo"
android:layout_width="10dp"
android:layout_height="10dp"/>
<View
android:id="@+id/bar"
android:layout_width="10dp"
android:layout_height="10dp"/>
</FrameLayout>
</LinearLayout>
</TabHost>
<EditText
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@={obj.text}"
/>
<TimePicker
android:id="@+id/timePicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hour="@={obj.hour}"
android:minute="@={obj.minute}"
/>
<DatePicker
android:id="@+id/datePicker"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:year="@={obj.year}"
android:month="@={obj.month}"
android:day="@={obj.day}"/>
<DatePicker
android:id="@+id/expressions1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:year="@={obj.year * @integer/oneThousand}"
android:month="@={11 - obj.month}"
android:day="@={obj.day + 1}"/>
<DatePicker
android:id="@+id/expressions2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:year="@={obj.year / @integer/oneThousand}"
android:month="@={@bool/alwaysTrue ? obj.month : obj.day}"
android:day="@={@bool/alwaysFalse ? obj.month : obj.day}"/>
<DatePicker
android:id="@+id/expressions3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:year="@={obj.list[@integer/one]}"
android:month="@={obj.map[`two`]}"
android:day="@={obj.array[1]}"/>
<DatePicker
android:id="@+id/expressions4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:year="@={(int)(100000f/obj.year)}"
android:month="@={1 + (obj.month / 2)}"
android:day="@={true ? obj.day : obj.month}"/>
<CheckBox
android:id="@+id/checkBox2"
android:checked="@{!checkBox.checked}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<CheckBox
android:id="@+id/checkBox3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<CheckBox
android:id="@+id/checkBox4"
android:checked="@{!checkBox3.checked}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<include
android:id="@+id/included"
layout="@layout/two_way_included"
android:obj="@{obj}"
android:text="@={obj.text}"/>
<EditText
android:id="@+id/editText1"
android:text="@={obj.editText}"
android:bufferType="editable"
android:onTextChanged="@{obj::textChanged1}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/editText2"
android:text="@={obj.editText}"
android:bufferType="editable"
android:onTextChanged="@{obj::textChanged2}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/convertBool"
android:text="@={`` + obj.booleanField}"
android:inputType="number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/convertByte"
android:text="@={`` + obj.byteField}"
android:inputType="number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/convertShort"
android:text="@={`` + obj.shortField}"
android:inputType="number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/convertInt"
android:text="@={`` + obj.intField}"
android:inputType="number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/convertLong"
android:text="@={`` + obj.longField}"
android:inputType="number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/convertFloat"
android:text="@={`` + obj.floatField}"
android:inputType="numberDecimal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/convertDouble"
android:text="@={`` + obj.doubleField}"
android:inputType="numberDecimal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/convertChar"
android:text="@={`` + obj.charField}"
android:inputType="number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/toField"
android:text="@={obj.textField}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/toStaticField"
android:text="@={android.databinding.testapp.vo.TwoWayBindingObject.staticField}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/simpleInstanceMethod"
android:text="@={obj.convertFromInt(obj.intField)}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/simpleStaticMethod"
android:text="@={android.databinding.testapp.vo.TwoWayBindingObject.convertFromFloat(obj.floatField)}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/genericInstanceMethod"
android:text="@={obj.convertFromList(obj.stringList)}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/typedInstanceMethod"
android:text="@={obj.convertFromStringList(obj.stringList)}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/arrayMethod"
android:text="@={obj.convertFromIntArray(obj.anotherArray)}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/pigLatin"
android:text="@={obj.fromPigLatin(obj.pigLatin)}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/sameTarget"
android:text="Hello World"
app:error="@{sameTarget.text}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Spinner
android:id="@+id/spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:selectedItemPosition="@={obj.selectedItemPosition}"
android:adapter="@{obj.spinnerAdapter}"/>
<TextView
android:id="@+id/mix_view_1"
android:enabled="@{obj.booleanField}"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/mix_view_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:enabled="@{obj.validate(mixView1.text)}"/>
<CheckBox
android:id="@+id/unaryNot"
android:checked="@={!obj.checked}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</layout>