i no fix the prob. androids

On Tue, Dec 14, 2010 at 5:43 AM, HippoMan <[email protected]> wrote:

> In a different thread, I asked if there was a way to query some object
> to define what subset of a long piece of text is actually being shown
> within a given TextView.
>
> Based on the scant feedback I received in response to this query, I
> have come to the conclusion that android probably does not provide any
> programmatic way to ask a TextView or one of its subsidary objects
> what subset of text is actually being displayed in the visible area of
> this view.
>
> So now, I'd like to approach this problem from a different direction:
>
> If I have a large piece of text (where "large" means that there is
> more text that can fit into the visible portion of a given TextView),
> how can I determine *in advance* which subset of the text will fit
> into the current visible screen area?
>
> I know that I can calculate this by taking the text view dimensions,
> its border and spacing characteristics, its font size, and other info
> into account. I also have to figure out how the text will be word-
> wrapped when writing it into the TextView.
>
> Of course, this can all be calculated, but I'm wondering if there
> already is a pre-existing method I can call (or a small number of pre-
> existing methods) which can tell me how much of a given piece of text
> will actually fit into the view?
>
> I do not want to reverse engineer existing android objects and "re-
> invent the wheel" if there already is a straightforward way to get
> this information from existing objects.
>
> Thanks in advance for any pointers you could give me.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Reply via email to