I want to concat two strings for a TextView in android, Data Binding Api

前端 未结 10 835
太阳男子
太阳男子 2020-12-23 14:04

Im using DataBinding Api for setting the views in android layouts. Here is my layout.

layout.xml



        
10条回答
  •  太阳男子
    2020-12-23 15:06

    The simplest way I found to be is to replace ''(single) in place of ""(double), For Eg. You have two variables,

    
    
    

    Now to concatenate,

    android:text='a + " " + b}'
    

提交回复
热议问题