Questions tagged [android-singleline]

Constrains the text to a single horizontally scrolling line

Constrains the text to a single horizontally scrolling line instead of letting it wrap onto multiple lines, and advances focus instead of inserting a newline when you press the enter key.

See this

8 questions
69
votes
10 answers

Is the xml attribute singleLine deprecated or not in Android?

singleLine is/was used in xml layout files for TextView and EditText something like the following: Some people on SO say…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
3
votes
1 answer

How to tell if TextView text has been truncated due to singleLine="true"?

I have a TextView that I would like to know if it has been truncated due to singleLine="true" in the XML. What are some ideas to achieve this without having to pass in the displayed text but to detect this with the TextView only?
David
  • 171
  • 2
  • 10
2
votes
3 answers

Calling setSingleLine on an EditText with inputType=textPassword make characters visible

I put an EditText with inputType="textPassword" in my activity's XML
Fartab
  • 4,725
  • 2
  • 26
  • 39
1
vote
1 answer

Android TextView clips text when setting maxlines="1" with gravity="center" and ellipsize="end"

When using maxLines="1" in combination with gravity="center" and ellipsize="end", the text gets clipped from the beginning.
Reza Bigdeli
  • 1,142
  • 1
  • 12
  • 25
1
vote
1 answer

How to effectively replace singleLine with maxLines in style?

I have a style as below And…
Elye
  • 53,639
  • 54
  • 212
  • 474
1
vote
2 answers

Get status of single line

We can set single line with this TextView textView = (TextView) view.findViewById(R.id.someTextView); textView.setSingleLine(true); But for get status of single line event getSingleLine() does not exit. How can check that single line for text view…
ashkufaraz
  • 5,179
  • 6
  • 51
  • 82
0
votes
0 answers

SingleLine cause gradient lose efficacy

TextView add android:singleLine="true" will cause gradient no effect。 After I remove the singleLine tag and only add android:maxLines=1, anything is ok.
-1
votes
2 answers

how to get single line in android textview

I have an image-view and text-view in my application page. When i am trying to set text to the text-view it is resulting into multi-lines but i want whole text into one single line. how can i do that? I want that text-view on 90 degree angle …
Aakash MEHTA
  • 75
  • 1
  • 5