Now i'm thinking it'll be easier to make calc in the constructor based
on image size and screen. not very elegant though

On Jan 26, 3:45 pm, Alexey <avolo...@gmail.com> wrote:
> I'm adding this listener in the constructor. I realize that i need to
> remove it but i'm not sure at what point . onLayout ?
> Is using a ViewTreeObserver a right direction in general  to implement
> functionality described ?
>
> On Jan 26, 3:32 pm, Romain Guy <romain...@google.com> wrote:
>
> > Did you remove your OnPreDrawListener? If you did not, then you are
> > creating an infinite loop :)
>
> > On Mon, Jan 26, 2009 at 12:44 PM, Alexey <avolo...@gmail.com> wrote:
>
> > > i've tried to settext to my textView in the OnPreDrawListener() for
> > > the ViewTreeObserver - it works but now everything is painfully slow.
>
> > > On Jan 26, 11:44 am, Alexey <avolo...@gmail.com> wrote:
> > >> Thanks a lot for your reply but i guess i'm confused how ellipsize
> > >> will help me if i don't know the width and height of the TextView.
> > >> task is a break a long text into two TextView to create wrap around
> > >> the Image effect.
> > >> I have an imageView and textview( where i need to put a short portion
> > >> of the text which should be equal of the height of the image on the
> > >> left ) and big text view below which will receive rest of the text.
>
> > >> On Jan 26, 11:15 am, Romain Guy <romain...@google.com> wrote:
>
> > >> > Hi,
>
> > >> > You don't need to do this, you can simply use the ellipsize feature of
> > >> > TextView. It will automatically truncate the text based on the
> > >> > available space.
>
> > --
> > 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