如何使文本的一部分,可点击喜欢的按钮,在Android的? [英] How to make a part of text clickable like button in Android?
本文介绍了如何使文本的一部分,可点击喜欢的按钮,在Android的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想按钮则myButton添加到TextView中。如何使它看起来像一组线得到它在一个单一的线。这里所添加的文本样本
I would like to add button myButton to TextView. How to get it in a single line so that it looks like one set of lines. Here is sample of the text to be added
请preSS这这里刷新的一组值。
我想有在这里为可点击的按钮。我怎样才能做到这一点。它的任何片段将是有益的。
I want to have "here" as clickable button. How can I do it. Any snippet on it would be helpful.
推荐答案
提出三点的TextView前:textView1,textView2和textView3
make three textView ex: textView1, textView2 and textView3.
<RelativeLayout android:id="@+id/textLay"
android:layout_width="fill_parent" android:layout_height="wrap_content"
>
<TextView android:id="@+id/textView1" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Please press this"/>
<TextView android:id="@+id/textView2" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="here"
android:layout_toRightOf="@+id/textView1" />
<TextView android:id="@+id/textView3" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="to refresh the set of values."
android:layout_toRightOf="@+id/textView2" />
</RelativeLayout>
这篇关于如何使文本的一部分,可点击喜欢的按钮,在Android的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文