Tried to post this the last two days (hopefully problem with this list is now resolved).
I haven't given up on figuring out how to display a single line of text that is wider than the view. More observations and questions: (1) ellipsize="marquee" is not allowed for EditText (generates exception). (2) ellipsize="marquee" doesn't do anything for TextView. Seems to just truncate text even with focus. Is there a trick to make this work? (3) scrollHorizontally="true" which is a documented attribute for TextView actually only applies to EditText. Is this a documentation bug? On Feb 2, 9:40 am, jotobjects <[email protected]> wrote: > Actually I have tried both marquee and scrollHorizontally. There was > a previous topic that I responded to a couple of days ago with the > marquee layout code (that also doesn't work). > > http://groups.google.com/group/android-developers/msg/5f466bd386877029 > > I was suspecting that some of the TextView attributes are only valid > for EditText views. Is that right - and if so how do you know which > TextView attributes are only valid for EditText views? > > This seems pretty basic - how to use a wide line of text on a small > screen device. What are good ways to deal with this use case? > > On Feb 1, 5:31 pm, Romain Guy <[email protected]> wrote: > > > scrollHorizontally enables user scrolling for editable text fields. If > > you want automatic scrolling, use android:ellipsis="marquee" > > > On Mon, Feb 1, 2010 at 3:11 PM, jotobjects <[email protected]> wrote: > > > Is there a way to put a single line of static text into a TextView and > > > allow the user to scroll over the part that is not initially visible? > > > I have tried scrollHorizontally, but I get text that > > > is truncated. This is the layout (that doesn't scroll). > > > > <TextView > > > android:id="@+id/wanttoscrollt" > > > android:layout_width="fill_parent" > > > android:layout_height="wrap_content" > > > android:singleLine="true" > > > android:ellipsize="end" > > > android:scrollHorizontally="true" > > > android:text="Blah blah andlongwordandmore" > > > ></TextView> > > > > I tried setting <requestFocus/> in the layout and also tried calling > > > requestFocus() in onCreate(). > > > > -- > > > 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 > > > -- > > Romain Guy > > Android framework engineer > > [email protected] > > > 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 [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

