Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ellipsize marquee/end [duplicate]

Tags:

android

I just came to know about using ellipsize in a Text View. But I cannot understand what difference in effect am I supposed to get if I set android:ellipsize="marquee" rather than using android:ellipsize="end".I am new to android. Please help.

like image 230
Syamantak Basu Avatar asked Sep 05 '12 09:09

Syamantak Basu


2 Answers

words that are longer than the view is wide to be ellipsized instead of broken in the middle. You will often also want to set scrollHorizontally or singleLine as well so that the text as a whole is also constrained to a single line instead of still allowed to be broken onto multiple lines.

Must be one of the following constant values.

Suppose original value text view is aaabbbccc and its fitting inside the view

Constant    Value   Description
none         0      
start        1      output will be : ...bccc
middle       2      output will be : aa...cc
end          3      output will be : aaab...
marquee      4      out put will be : aaabbbccc auto sliding from right to left
like image 65
Vijay Vankhede Avatar answered Oct 30 '22 23:10

Vijay Vankhede


If you want to make your textview to scroll horizontally then ellipsize "marquee" will only work. Ellipsize "end" will help you to make your textview ellipsize with "..."

like image 42
Sankar Avatar answered Oct 31 '22 00:10

Sankar