Android 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="@{, 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