Note that cupcake will have the marquee feature on TextView.

On Fri, Jan 30, 2009 at 12:31 PM, Zach Hobbs <ho...@helloandroid.com> wrote:
>
> You can create a custom singleLine TextView and animate it by creating a loop
> and calling scrollBy(x,y) incrementing/decrementing the x value.
>
> -Zach
>
>
>
>
> On Thursday 29 January 2009 7:47:49 pm Rodrigo wrote:
>> HI,
>>
>> What is the best way to implement scrolling text (with behavior
>> similar to that of HTML tag 'marquee')??
>>
>> I've been trying to do this using TextViews + Animations but I'm
>> having troubles primarily because of sizing issues. If my text is long
>> enough that it exceeds the screen width, it won't be drawn completely
>> (it's size will be chopped at screen width). Thus,  when I animate it
>> from right to left, only a part of the text will be displayed. This
>> happens if I allow a maximum of 1 line in my TextView, because
>> otherwise it makes the TextView have multiple lines. If I make it
>> horizontally scrollable, the same 'chopped-off' behavior is seen.
>>
>> I think this happens because the TextView's parent imposes some
>> restrictions on its size. Is there a way to bypass these restrictions
>> so that the TextView is 'drawn' even if parts of it will be off-
>> screen?
>>
>> If that's not possible, what's an alternative way of implementing this
>> behavior?
>>
>> Thanks!
>>
>
>
> --
>
> Zach Hobbs
> HelloAndroid.com
> Android OS news, tutorials, downloads
>
> >
>



-- 
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