I’ve added an EditText to my layout, and added a hint, and made it centered horizontally. When running the application, the hint was invisible. I found that I should...
I can use android:gravity="bottom|center_horizontal" in xml on a textview to get my desired results, but I need to do this programmatically. My textview is inside a tablerow if that...
When I have a TextView with a \n in the text,, on the right I have two singleLine TextViews, one below the other with no spacing in between. I...
I have a TextView which displays a long text. I want to give some space between lines like in CSS with line-height property. How can I do it? 10...
I’m trying to use the TextView constructor with style like this: TextView myText = new TextView(MyActivity.this, null, R.style.my_style); However, when I do this, the text view does not appear...
I would like to be able to assign a xml attribute or style to a TextView that will make whatever text it has in ALL CAPITAL LETTERS. The attributes...
When I define a TextView in xml, how do I add a new line to it? \n seems not to work. <TextView android:id="@+id/txtTitlevalue" android:text="Line1 -\nLine2" android:layout_width="54dip" android:layout_height="fill_parent" android:textSize="11px" />...
I have the text “Android is a Software stack“. In this text i want to set the “stack” text as clickable. So, if you click on that it will...
Is there a way to set the textStyle attribute of a TextView programmatically? There doesn’t appear to be a setTextStyle() method. To be clear, I am not talking about...
How to change the font in a TextView, as default it’s shown up as Arial? How to change it to Helvetica? 16 Answers 16