Loading docs/html/tools/data-binding/guide.jd +31 −10 Original line number Original line Diff line number Diff line Loading @@ -1655,13 +1655,31 @@ public static ColorDrawable convertColorToDrawable(int color) { <h3 id="studio_support">Android Studio Support for Data Binding</h3> <h3 id="studio_support">Android Studio Support for Data Binding</h3> <p> <p> Android Studio supports syntax highlighting of data binding expressions, and flags any expression Android Studio supports many of the code editing features for data binding code. language syntax errors in the editor. For example, it supports the following features for data binding expressions:</p> </p> <ul> <li>Syntax highlighting</li> <li>Flagging of expression language syntax errors</li> <li>XML code completion</li> <li>References, including <a class="external-link" href="https://www.jetbrains.com/help/idea/2016.1/navigation-in-source-code.html?origin=old_help"> navigation</a> (such as navigate to a declaration) and <a class="external-link" href="https://www.jetbrains.com/help/idea/2016.1/viewing-inline-documentation.html?origin=old_help"> quick documentation</a></li> </ul> <p class="note"><strong>Note:</strong> Arrays and a <a href="https://docs.oracle.com/javase/tutorial/java/generics/types.html" class="external-link">generic type</a>, such as the {@link android.databinding.Observable} class, might display errors when there are no errors.</p> <p> <p> The Preview pane displays default values for data binding expressions if provided. In the following The Preview pane displays default values for data binding expressions if example excerpt of an element from a layout XML file, the Preview pane displays the provided. In the following {@code PLACEHOLDER} default text value in the <code>TextView</code>. example excerpt of an element from a layout XML file, the Preview pane displays the {@code PLACEHOLDER} default text value in the <code>TextView</code>. </p> </p> <pre> <pre> Loading @@ -1671,8 +1689,11 @@ example excerpt of an element from a layout XML file, the Preview pane displays </pre> </pre> <p> <p> If you need to display a default value during the design phase of your project, you If you need to display a default value during the design phase of your project, can also use tools attributes instead of default expression values, as described in you can also use tools attributes instead of default expression values, as <a class="external-link" href="http://tools.android.com/tips/layout-designtime-attributes"> described in <a class="external-link" href="http://tools.android.com/tips/layout-designtime-attributes"> Designtime Layout Attributes</a>. Designtime Layout Attributes</a>. </p> </p> Loading
docs/html/tools/data-binding/guide.jd +31 −10 Original line number Original line Diff line number Diff line Loading @@ -1655,13 +1655,31 @@ public static ColorDrawable convertColorToDrawable(int color) { <h3 id="studio_support">Android Studio Support for Data Binding</h3> <h3 id="studio_support">Android Studio Support for Data Binding</h3> <p> <p> Android Studio supports syntax highlighting of data binding expressions, and flags any expression Android Studio supports many of the code editing features for data binding code. language syntax errors in the editor. For example, it supports the following features for data binding expressions:</p> </p> <ul> <li>Syntax highlighting</li> <li>Flagging of expression language syntax errors</li> <li>XML code completion</li> <li>References, including <a class="external-link" href="https://www.jetbrains.com/help/idea/2016.1/navigation-in-source-code.html?origin=old_help"> navigation</a> (such as navigate to a declaration) and <a class="external-link" href="https://www.jetbrains.com/help/idea/2016.1/viewing-inline-documentation.html?origin=old_help"> quick documentation</a></li> </ul> <p class="note"><strong>Note:</strong> Arrays and a <a href="https://docs.oracle.com/javase/tutorial/java/generics/types.html" class="external-link">generic type</a>, such as the {@link android.databinding.Observable} class, might display errors when there are no errors.</p> <p> <p> The Preview pane displays default values for data binding expressions if provided. In the following The Preview pane displays default values for data binding expressions if example excerpt of an element from a layout XML file, the Preview pane displays the provided. In the following {@code PLACEHOLDER} default text value in the <code>TextView</code>. example excerpt of an element from a layout XML file, the Preview pane displays the {@code PLACEHOLDER} default text value in the <code>TextView</code>. </p> </p> <pre> <pre> Loading @@ -1671,8 +1689,11 @@ example excerpt of an element from a layout XML file, the Preview pane displays </pre> </pre> <p> <p> If you need to display a default value during the design phase of your project, you If you need to display a default value during the design phase of your project, can also use tools attributes instead of default expression values, as described in you can also use tools attributes instead of default expression values, as <a class="external-link" href="http://tools.android.com/tips/layout-designtime-attributes"> described in <a class="external-link" href="http://tools.android.com/tips/layout-designtime-attributes"> Designtime Layout Attributes</a>. Designtime Layout Attributes</a>. </p> </p>