简体   繁体   English

将EditText值传递给Android中具有相同样式的另一个活动

[英]Pass EditText Value to Another Activity with Same Style in Android

I am having an editext with the text " This is a BOLD Text " and " This is a ITALIC Text " 我正在使用文本“ This is a Bold Text ”和“ This is ITALIC Text ”的editext。

and I am going to pass this edittext value to another activity with same text 我将把这个edittext值传递给另一个具有相同文本的活动

In the second activity I am having an TextView, if I display a edittext value in to the text view I am getting like this 在第二个活动中,我有一个TextView,如果在文本视图中显示一个edittext值,我将得到如下所示

"This is a BOLD Text" and "This is a ITALIC Text" “这是一个粗体文本”和“这是一个ITALIC文本”

How to pass the edittext value with same style 如何以相同的样式传递edittext值

Can pass text in html format like: 可以传递html格式的文本,例如:

textView.setText(Html.fromHtml(" This is a BOLD Text ")); textView.setText(Html.fromHtml(“ 这是一个粗体文本 ”))); or textView.setText(Html.fromHtml(" This is a ITALIC Text ")); 或textView.setText(Html.fromHtml(“ 这是ITALIC文本 ”));或者

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM