Loading docs/html/tools/data-binding/guide.jd +38 −36 Original line number Diff line number Diff line Loading @@ -153,42 +153,6 @@ versions back to <strong>Android 2.1</strong> (API level 7+).</p> <p>To use data binding, Android Plugin for Gradle <strong>1.5.0-alpha1</strong> or higher is required.</p> <h4>Beta release</h4> <div class="caution"> <p>Please note that the Data Binding library is a <strong>beta release</strong>. While Data Binding is in beta, developers should be aware of the following caveats:</p> <ul> <li> 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 <a href="https://code.google.com/p/android-developer-preview/">issue tracker</a>. </li> <li> 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. </li> <li> 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. </li> <li> We’re just getting started with Android Studio support at this time. Further Android Studio support will come in the future. </li> <li> By using the Data Binding library beta release, you acknowledge these caveats.</li> </ul> </div> <h2 id="build_environment"> Build Environment </h2> Loading Loading @@ -408,6 +372,36 @@ ListItemBinding binding = DataBindingUtil.<em>inflate</em>(layoutInflater, R.lay </LinearLayout> </layout> </pre> <p> Some specialized click event handlers exist and they need an attribute other than <code>android:onClick</code> to avoid a conflict. The following attributes have been created to avoid such conflicts: </p> <table> <tr> <th>Class</th> <th>Listener Setter</th> <th>Attribute</th> </tr> <tr> <td>{@link android.widget.SearchView}</td> <td>{@link android.widget.SearchView#setOnSearchClickListener}</td> <td><code>android:onSearchClick</code></td> </tr> <tr> <td>{@link android.widget.ZoomControls}</td> <td>{@link android.widget.ZoomControls#setOnZoomInClickListener}</td> <td><code>android:onZoomIn</code></td> </tr> <tr> <td>{@link android.widget.ZoomControls}</td> <td>{@link android.widget.ZoomControls#setOnZoomOutClickListener}</td> <td><code>android:onZoomOut</code></td> </tr> </table> <h2 id="layout_details"> Layout Details </h2> Loading Loading @@ -540,6 +534,14 @@ ListItemBinding binding = DataBindingUtil.<em>inflate</em>(layoutInflater, R.lay <code>boolean</code>, etc. </p> <p> A special variable named <code>context</code> is generated for use in binding expressions as needed. The value for <code>context</code> is the <code>Context</code> from the root View's {@link android.view.View#getContext}. The <code>context</code> variable will be overridden by an explicit variable declaration with that name. </p> <h3 id="custom_binding_class_names"> Custom Binding Class Names </h3> Loading Loading
docs/html/tools/data-binding/guide.jd +38 −36 Original line number Diff line number Diff line Loading @@ -153,42 +153,6 @@ versions back to <strong>Android 2.1</strong> (API level 7+).</p> <p>To use data binding, Android Plugin for Gradle <strong>1.5.0-alpha1</strong> or higher is required.</p> <h4>Beta release</h4> <div class="caution"> <p>Please note that the Data Binding library is a <strong>beta release</strong>. While Data Binding is in beta, developers should be aware of the following caveats:</p> <ul> <li> 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 <a href="https://code.google.com/p/android-developer-preview/">issue tracker</a>. </li> <li> 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. </li> <li> 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. </li> <li> We’re just getting started with Android Studio support at this time. Further Android Studio support will come in the future. </li> <li> By using the Data Binding library beta release, you acknowledge these caveats.</li> </ul> </div> <h2 id="build_environment"> Build Environment </h2> Loading Loading @@ -408,6 +372,36 @@ ListItemBinding binding = DataBindingUtil.<em>inflate</em>(layoutInflater, R.lay </LinearLayout> </layout> </pre> <p> Some specialized click event handlers exist and they need an attribute other than <code>android:onClick</code> to avoid a conflict. The following attributes have been created to avoid such conflicts: </p> <table> <tr> <th>Class</th> <th>Listener Setter</th> <th>Attribute</th> </tr> <tr> <td>{@link android.widget.SearchView}</td> <td>{@link android.widget.SearchView#setOnSearchClickListener}</td> <td><code>android:onSearchClick</code></td> </tr> <tr> <td>{@link android.widget.ZoomControls}</td> <td>{@link android.widget.ZoomControls#setOnZoomInClickListener}</td> <td><code>android:onZoomIn</code></td> </tr> <tr> <td>{@link android.widget.ZoomControls}</td> <td>{@link android.widget.ZoomControls#setOnZoomOutClickListener}</td> <td><code>android:onZoomOut</code></td> </tr> </table> <h2 id="layout_details"> Layout Details </h2> Loading Loading @@ -540,6 +534,14 @@ ListItemBinding binding = DataBindingUtil.<em>inflate</em>(layoutInflater, R.lay <code>boolean</code>, etc. </p> <p> A special variable named <code>context</code> is generated for use in binding expressions as needed. The value for <code>context</code> is the <code>Context</code> from the root View's {@link android.view.View#getContext}. The <code>context</code> variable will be overridden by an explicit variable declaration with that name. </p> <h3 id="custom_binding_class_names"> Custom Binding Class Names </h3> Loading