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:

- -
-

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: +

+ + + + + + + + + + + + + + + + + + + + + + +
ClassListener SetterAttribute
{@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