diff --git a/docs/html/tools/data-binding/guide.jd b/docs/html/tools/data-binding/guide.jd index 9629bb022201d..6acc38c2f1445 100644 --- a/docs/html/tools/data-binding/guide.jd +++ b/docs/html/tools/data-binding/guide.jd @@ -131,6 +131,11 @@ page.tags="databinding", "layouts" + +
  • + Android Studio Support for Data Binding +
  • + @@ -211,8 +216,9 @@ android { must configure data binding in its build.gradle file as well.

    Also, make sure you are using a compatible version of Android Studio. -Android Studio 1.3 adds the code-completion and layout-preview -support for data binding.

    +Android Studio 1.3 and later provides support for data binding as described in +Android Studio Support for Data Binding. +

    Data Binding Layout Files @@ -1643,3 +1649,28 @@ public static ColorDrawable convertColorToDrawable(int color) { android:layout_width="wrap_content" android:layout_height="wrap_content"/> + +

    Android Studio Support for Data Binding

    + +

    +Android Studio supports syntax highlighting of data binding expressions, and flags any expression +language syntax errors in the editor. +

    +

    +The Preview pane displays default values for data binding expressions if provided. In the following +example excerpt of an element from a layout XML file, the Preview pane displays the +{@code PLACEHOLDER} default text value in the TextView. +

    + +
    +<TextView android:layout_width="wrap_content"
    +   android:layout_height="wrap_content"
    +   android:text="@{user.firstName, default=PLACEHOLDER}"/>
    +
    + +

    +If you need to display a default value during the design phase of your project, you +can also use tools attributes instead of default expression values, as described in + +Designtime Layout Attributes. +

    \ No newline at end of file