diff options
author | George Mount <mount@google.com> | 2015-06-29 17:04:04 -0700 |
---|---|---|
committer | George Mount <mount@google.com> | 2015-06-29 17:04:04 -0700 |
commit | fdfbbcd5ecf37d77a4b9ab1cefdebd68de71ca2b (patch) | |
tree | 7f1228effbfbf75e33a8085c41d59c27bd0e09e6 /integration-tests/TestApp/app | |
parent | c1560e6b00b398867da12fbdc5a1fcd1d50b801c (diff) | |
download | data-binding-fdfbbcd5ecf37d77a4b9ab1cefdebd68de71ca2b.tar.gz |
Fix bug preventing use of android IDs for Views.
Bug 22160629
Change-Id: Ib0a2b6d5333e63e25045ccf39a5582e1d74494df
Diffstat (limited to 'integration-tests/TestApp/app')
-rw-r--r-- | integration-tests/TestApp/app/src/androidTestApi7/java/android/databinding/testapp/BasicBindingTest.java | 9 | ||||
-rw-r--r-- | integration-tests/TestApp/app/src/main/res/layout/just_id.xml | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/integration-tests/TestApp/app/src/androidTestApi7/java/android/databinding/testapp/BasicBindingTest.java b/integration-tests/TestApp/app/src/androidTestApi7/java/android/databinding/testapp/BasicBindingTest.java index d7bd2819..cfae4cc6 100644 --- a/integration-tests/TestApp/app/src/androidTestApi7/java/android/databinding/testapp/BasicBindingTest.java +++ b/integration-tests/TestApp/app/src/androidTestApi7/java/android/databinding/testapp/BasicBindingTest.java @@ -22,6 +22,7 @@ import android.databinding.testapp.databinding.JustIdBinding; import android.test.UiThreadTest; import android.view.View; import android.view.ViewGroup; +import android.widget.TextView; public class BasicBindingTest extends BaseDataBinderTest<BasicBindingBinding> { public BasicBindingTest() { @@ -152,6 +153,14 @@ public class BasicBindingTest extends BaseDataBinderTest<BasicBindingBinding> { assertNotSame(binding.textView, mBinder.textView); } + @UiThreadTest + public void testAndroidId() throws Throwable { + JustIdBinding binding = JustIdBinding.inflate(getActivity().getLayoutInflater()); + assertNotNull(binding); + assertNotNull(binding.empty); + assertTrue(binding.empty instanceof TextView); + } + private void assertAB(String a, String b) { mBinder.setA(a); mBinder.setB(b); diff --git a/integration-tests/TestApp/app/src/main/res/layout/just_id.xml b/integration-tests/TestApp/app/src/main/res/layout/just_id.xml index 211761ad..47860f91 100644 --- a/integration-tests/TestApp/app/src/main/res/layout/just_id.xml +++ b/integration-tests/TestApp/app/src/main/res/layout/just_id.xml @@ -22,5 +22,10 @@ android:text="Hello World" android:layout_width="wrap_content" android:layout_height="wrap_content"/> + <TextView + android:id="@android:id/empty" + android:text="Hello World" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> </LinearLayout> </layout>
\ No newline at end of file |