[android-developers] Re: Measuring Views

2009-01-27 Thread Alexey
Well it's seems to me if I set my text into TextView in on dispatchDraw (Canvas canvas) everything is measuring and splitting correctly On Jan 26, 9:50 pm, Alexey avolo...@gmail.com wrote: Now i'm thinking it'll be easier to make calc in the constructor based on image size and screen. not very

[android-developers] Re: Measuring Views

2009-01-26 Thread Romain Guy
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. On Mon, Jan 26, 2009 at 9:05 AM, Alexey avolo...@gmail.com wrote: Hi all , i have a custom View with layout LinearLayout

[android-developers] Re: Measuring Views

2009-01-26 Thread Alexey
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

[android-developers] Re: Measuring Views

2009-01-26 Thread Alexey
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

[android-developers] Re: Measuring Views

2009-01-26 Thread Alexey
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 .