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
Please press this here to refresh the set of values.
I want to have "here" as clickable button. How can I do it. Any snippet on it would be helpful.
Set background of
Button
as null byandroid:background="@null"
give the same text color as given to otherTextView
's.or You can take 3 TextView's and
setOnClickListener
to middle one.Just add below attribute to TextView in XML layout file to make it clickable.
In your Java file add OnClickListener to complete click action on text view.
Set style of
Button
with borderless android attribut to remove background and border:make three textView ex: textView1, textView2 and textView3.
Add
android:clickable="true"
andandroid:onClick="yourclickname"
for theTextView
in the XML. Then defineyourclickname
in your activity. This should make yourTextView
clickable and triggers the specified method when clicked.