<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="android.text.Html"/>
</data>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical"
android:text="@{Html.fromHtml(`some message from model` + ` `)}"/>
</RelativeLayout>
</layout>
Here I am trying to leave some blank space after text in TextView
, but it is showing this error.
Error:Execution failed for task ':app:dataBindingProcessLayoutsDebug'.
The entity "nbsp" was referenced, but not declared.
I have tried with simple space in xml, but it doesn't leave blank spaces android:text="@{'some message from model' + ' '}"
Remove the @nbsp
and try with it hexa(decimal)
value  
.
because in XML the main five entity are below :
quet(")
, amp(&)
, apos(')
, It(<)
and gt(>)
In which the @nbsp
to not there so you need to use it hexa(decimal) value  
.
If We have to put Space in XML using HTMl we use  
But in Xml it give this error :
The entity "nbsp" was referenced, but not declared.
Because the Main five entity of XMl is I define Upper so you have to use it hexa(decimal) value..
so  
you have to  
. but again &
is XMl Entity so you have convert &
to &
so it will work.
In SHORT :
 
means &#160