Android Data Binding Library suggest change

Default value in Data Binding

The Preview pane displays default values for data binding expressions if provided.

For example :

android:layout_height="@{@dimen/main_layout_height, default=wrap_content}"

It will take wrap_content while designing and will act as a wrap_content in preview pane.

Another example is

android:text="@{user.name, default=`Preview Text`}"

It will display Preview Text in preview pane but when you run it in device/emulator actual text binded to it will be displayed

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents