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

前端 未结 10 818
太阳男子
太阳男子 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 14:53

    This is already answered by @GeorgeMount in comments to one of the solution. Which to me looks like the best solution so far here.

    android:text="@{@string/location(user.city,user.state)}"
    

    in your strings.xml

    %1$s, %2$s
    

提交回复
热议问题