You are not crazy.  I see the exact same problem w/ ellipsizing and a
multi-line TextView as you described above.

On Jun 11, 2:58 pm, "nEx.Software" <justin.shapc...@gmail.com> wrote:
> For the time being, I decided to roll my ownellipsizefunction, which
> I will call on my own and then feed into myTextView. It is highly
> customized for my own purposes, so would likely not fit well within
> the realm of the core framework, but now that I have a better idea of
> what is going on, I just may try to patch the core. Note, I was able
> to get the standardellipsizefunction to use my own customellipsize
> character(s) but it was not the "right" way of doing it... while I am
> at it, I might try to figure out some other text formatting things I
> wanted, namely indents (hanging indent, first line indent, etc...)
>
> I will clean up my code and post here in the near future, for
> reference purposes.
>
> On Jun 10, 3:56 pm, "nEx.Software" <justin.shapc...@gmail.com> wrote:
>
>
>
> > Further experimentation results in the following... I was not crazy, I
> > had seen three lines in an ellipsizedTextViewbefore. And I have now
> > figured out how it is working (or, rather, not working)... It is
> > ellipsizing each paragraph separately (and limiting each paragraph to
> > two lines) as opposed to taking the entire string and ellipsizing
> > that. This means two things... I will be filing a bug report, and I
> > will be looking to see if I can patch it in the meantime.
>
> > For my own project, I'll have to either notellipsize, hack an
> > ellipsizer on my own (ugh), or faking it by layering anothertextview
> > over top, so as to obscure the text I am "ellipsizing". I am aware
> > this is not a good solution and I cringe at even saying it, but in a
> > pinch it just may have to do... Sorry for triple posting here, but I
> > figured others might be interested.
>
> > On Jun 10, 2:26 pm, "nEx.Software" <justin.shapc...@gmail.com> wrote:
>
> > > So, I am experimenting further, and am finding that no matter what I
> > > do, I am only getting 2 lines while using theellipsizeattribute on
> > > myTextView. So, either I am doing something terribly wrong or
> > > something has gone awry. Maybe I never have actually seen it go more
> > > than 2 lines and I am actually just dreaming? Now, I suppose I'll dive
> > > into the source of theellipsizefunction (in android.text.TextUtils)
> > > and see what's going on in there.
>
> > > On Jun 10, 1:10 pm, "nEx.Software" <justin.shapc...@gmail.com> wrote:
>
> > > > Thanks for the quick reply Romain. Unfortunately, I'm seeing a
> > > > different result in my app. When I useellipsizeon a multiline
> > > >TextView, I get inconsistent results. For example, sometimes a piece
> > > > of text that could easily fill the 4 lines that I have set as max,
> > > > gets stopped and ellipsized on the second line, or the third line.
> > > > Other times, these go the full four lines. I guess I assumed that it
> > > > was deciding that a word on the second or third line needed to be
> > > > ellipsized and then just stopped rather than wrapping and continuing
> > > > on. Maybe it was my own mis-evaluation of my problem?
>
> > > > If see if I can get the customellipsizecharacters working, and (if I
> > > > do) figure out how to submit a patch... Unfortunately, one place where
> > > > I wanted to use this was a Widget, so I'll still need to figure
> > > > something else out for that, since I can't use a subclassedTextView.
> > > > Again, I appreciate the quick response.
>
> > > > On Jun 10, 10:03 am, Romain Guy <romain...@google.com> wrote:
>
> > > > > > 1) Is there anyway to getellipsizeto work on a multilineTextView?
> > > > > > So that the ellipses are shown at the end of the text, rather than 
> > > > > > at
> > > > > > the end of the line? If not what is the best way to handle this on 
> > > > > > my
> > > > > > own?]]
>
> > > > > That's already what it does, see the Home screen's list of apps for 
> > > > > instance.
>
> > > > > > 2) Is there any way to change the character used for eellipsize? For
> > > > > > example, use "... [Read More]", this obviously coincides with 
> > > > > > question
> > > > > > 1 above since one wouldn't want to take half of the single line to 
> > > > > > say
> > > > > > read more, but on a multiline, it would be nice to be able to have
> > > > > > like 3 or 4 lines and then a read more? Maybe there is a better way 
> > > > > > to
> > > > > > do this that I haven't figured out yet?
>
> > > > > Not at the moment. Patches are most welcome though :)
>
> > > > > --
> > > > > Romain Guy
> > > > > Android framework engineer
> > > > > romain...@android.com
>
> > > > > Note: please don't send private questions to me, as I don't have time
> > > > > to provide private support.  All such questions should be posted on
> > > > > public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to