summaryrefslogtreecommitdiff
path: root/integration-tests/TestApp/app/src/main/java/android/databinding
diff options
context:
space:
mode:
authorYigit Boyar <yboyar@google.com>2015-04-30 22:32:54 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-30 22:32:54 +0000
commitd37fd3b4670aa973400cd02e7a977db8c49cb022 (patch)
tree60ec7b9c9296badf588fda8e53769e1eb98ea436 /integration-tests/TestApp/app/src/main/java/android/databinding
parentcffffe30fe53455856d3d41724b9d5dd21aebf9a (diff)
parent8152eb857064d749a6131ae2707799c36d93f510 (diff)
downloaddata-binding-d37fd3b4670aa973400cd02e7a977db8c49cb022.tar.gz
Merge "Add test for adapters with custom namespace and only 1 parameter"
Diffstat (limited to 'integration-tests/TestApp/app/src/main/java/android/databinding')
-rw-r--r--integration-tests/TestApp/app/src/main/java/android/databinding/testapp/adapter/CustomNamespaceAdapter.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/integration-tests/TestApp/app/src/main/java/android/databinding/testapp/adapter/CustomNamespaceAdapter.java b/integration-tests/TestApp/app/src/main/java/android/databinding/testapp/adapter/CustomNamespaceAdapter.java
new file mode 100644
index 00000000..103d020c
--- /dev/null
+++ b/integration-tests/TestApp/app/src/main/java/android/databinding/testapp/adapter/CustomNamespaceAdapter.java
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+package android.databinding.testapp.adapter;
+
+import android.databinding.BindingAdapter;
+import android.widget.TextView;
+
+public class CustomNamespaceAdapter {
+ @BindingAdapter("android:set1")
+ public static void setOne(TextView view, String value) {
+ view.setText(value);
+ }
+
+ @BindingAdapter("bind:set2")
+ public static void setTwo(TextView view, String value) {
+ view.setText(value);
+ }
+}