Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
538 views
in Technique[技术] by (71.8m points)

android - 将String设置为Edittext时\ n(换行)的双向数据绑定问题(Two way data binding issue of (new line) while set String into Edittext)

I am facing one issue while set data into Edittext when using TWO WAY DATA BINDING which contain HTML tags like

(我面临的一个问题,而使用双向数据时,数据集到EDITTEXT 约束力 包含HTML标签,如)
or \n.

(或\ n。)

when there is \n it next data should be in new line.

(\ n时,下一个数据应放在换行中。)

it shows me like...

(它显示我喜欢...)

在此处输入图片说明

 <com.google.android.material.textfield.TextInputEditText
                        android:id="@+id/tiemyComments"
                        android:ellipsize="end"
                        android:hint="@string/date"
                        android:inputType="date"
                        android:maxLines="1"
                        android:singleLine="true"
                        android:text="@={myComments}" />
  ask by Rjz Satvara translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...