From 9b332f3c6ebabc5bc4ba7a6d20d84575f9662ed3 Mon Sep 17 00:00:00 2001
From: George Mount
Date: Thu, 28 Jan 2016 14:31:25 -0800
Subject: [PATCH] Remove beta notification for data binding and add a few docs.
Removed the beta warning for data binding.
Added information about renamed attributes.
Added information about context variable.
Change-Id: I7052416d8329a0cb812819017087e4e62d81e0c4
---
docs/html/tools/data-binding/guide.jd | 74 ++++++++++++++-------------
1 file changed, 38 insertions(+), 36 deletions(-)
diff --git a/docs/html/tools/data-binding/guide.jd b/docs/html/tools/data-binding/guide.jd
index 6acc38c2f1445..b57fba7f822f4 100644
--- a/docs/html/tools/data-binding/guide.jd
+++ b/docs/html/tools/data-binding/guide.jd
@@ -153,42 +153,6 @@ versions back to Android 2.1 (API level 7+).
To use data binding, Android Plugin for Gradle 1.5.0-alpha1
or higher is required.
-Beta release
-
-
-
Please note that the Data Binding library is a beta release.
- While Data Binding is in beta, developers should be aware of the following
- caveats:
-
- -
- This is a beta release of the feature intended to generate developer
- feedback. It might contain bugs, and it might not work for your use case,
- so use it at your own risk. That said, we do want your feedback! Please
- let us know what is or isn’t working for you using the issue
- tracker.
-
- -
- The Data Binding library beta release is subject to significant changes,
- including those which are not source code compatible with your app. That is,
- significant rework may be required to take updates to the library in the future.
-
- -
- Developers should feel free to publish apps built with the Data Binding
- library beta release, with the caveats that the standard Android SDK and
- Google Play terms of service apply, and it’s always a great idea to test your
- app thoroughly when adopting new libraries or tools.
-
- -
- We’re just getting started with Android Studio support at this time.
- Further Android Studio support will come in the future.
-
- -
- By using the Data Binding library beta release, you acknowledge these
- caveats.
-
-
-
Build Environment
@@ -408,6 +372,36 @@ ListItemBinding binding = DataBindingUtil.inflate(layoutInflater, R.lay
</LinearLayout>
</layout>
+
+
+ Some specialized click event handlers exist and they need an attribute other than
+ android:onClick to avoid a conflict. The following attributes have been created
+ to avoid such conflicts:
+
+
+
+
+ | Class |
+ Listener Setter |
+ Attribute |
+
+
+ | {@link android.widget.SearchView} |
+ {@link android.widget.SearchView#setOnSearchClickListener} |
+ android:onSearchClick |
+
+
+ | {@link android.widget.ZoomControls} |
+ {@link android.widget.ZoomControls#setOnZoomInClickListener} |
+ android:onZoomIn |
+
+
+ | {@link android.widget.ZoomControls} |
+ {@link android.widget.ZoomControls#setOnZoomOutClickListener} |
+ android:onZoomOut |
+
+
+
Layout Details
@@ -540,6 +534,14 @@ ListItemBinding binding = DataBindingUtil.inflate(layoutInflater, R.lay
boolean, etc.
+
+ A special variable named context is generated for use in binding
+ expressions as needed. The value for context is the
+ Context from the root View's {@link android.view.View#getContext}.
+ The context variable will be overridden by an explicit variable
+ declaration with that name.
+
+
Custom Binding Class Names