I am wondering if there is a way to handle the user pressing Enter while typing in an EditText, something like the onSubmit HTML event. Also wondering if there...
Is it possible to set multiple styles for different pieces of text inside a TextView? For instance, I am setting the text as follows: tv.setText(line1 + "\n" + line2...
How can I hide the EditText underbar (the prompt line with little serifs at the ends)? There might be a better way to do what I want: I have...
In XML, we can set a text color by the textColor attribute, like android:textColor="#FF0000". But how do I change it by coding? I tried something like: holder.text.setTextColor(R.color.Red); Where holder...
How do I make the background of a Textview about 20% transparent (not fully transparent), where there is a color in the background (i.e. white)? 19 s 19 Use...
Is it possible to draw a border around a textview? 23 s 23 You can set a shape drawable (a rectangle) as background for the view. <TextView android:text="Some text"...
So I’d like to change the android:fontFamily in Android but I don’t see any pre-defined fonts in Android. How do I select one of the pre-defined ones? I don’t...
I have simple HTML: <h2>Title</h2><br> <p>description here</p> I want to display HTML styled text it in TextView. How to do this? 28 s 28 You need to use Html.fromHtml()...
I am displaying text in a TextView that appears to be too long to fit into one screen. I need to make my TextView scrollable. How can I do...
How to set TextView style (bold or italic) within Java and without using the XML layout? In other words, I need to write android:textStyle with Java. 27 s 27...