summaryrefslogtreecommitdiff
path: root/integration-tests/TestApp/app
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2015-06-30 14:22:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-30 14:22:48 +0000
commit1b506ae96dc762ac027104248807ca3ae078711d (patch)
treeecb2fd6250c7303ea0edd646c6d09dafe115b5b5 /integration-tests/TestApp/app
parente67abb55de62e735eb2a2a406ce22a1dfa9e9a46 (diff)
parentfdfbbcd5ecf37d77a4b9ab1cefdebd68de71ca2b (diff)
downloaddata-binding-1b506ae96dc762ac027104248807ca3ae078711d.tar.gz
Merge "Fix bug preventing use of android IDs for Views." into mnc-dev
Diffstat (limited to 'integration-tests/TestApp/app')
-rw-r--r--integration-tests/TestApp/app/src/androidTestApi7/java/android/databinding/testapp/BasicBindingTest.java9
-rw-r--r--integration-tests/TestApp/app/src/main/res/layout/just_id.xml5
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