@Chris, I can't even get the simple TextView example you posted to
ellipsize - I just immediately get a stack overflow exception. If I
get rid of "singleLine=true", then at least it doesn't crash, however
the ellipsize won't be there! This is the only way I can get ANY
ellipsis to appear - by supplying a string without spaces!:

<TextView
 
android:text="Loremsdfsldkjfsdkljfdslkjfsdkljflsdkjfklsdjlfjslkjfkldsjfdlskjfl"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:ellipsize="end"
  android:maxLines="1"
  />

that just does not seem too useful!

On Sep 25, 3:00 pm, "Chris W." <[email protected]> wrote:
> I came across this ticket 
> :http://code.google.com/p/android/issues/detail?id=882
>
> The bottom entry highlights concerns that the only way toellipsizea
> view is to use the 'singleLine' or 'inputType' attributes. I tried
> these and was able to get a text view element toellipsizebut only
> with the 'singleLine' attribute. 'inputType=text' didn't work toellipsizethe 
> text. This ellipsized the text:
>
> <TextView
>         android:text="Lorem ipsum dolor sit amet, consectetur
> adipisicing elit, sed
> do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
> ad minim
> veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
> ea commodo
> consequat. Duis aute irure dolor in reprehenderit in voluptate velit
> esse cillum
> dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
> proident, sunt
> in culpa qui officia deserunt mollit anim id est laborum."
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:singleLine="true"
>         android:ellipsize="end" />
>
> I then changed the element from being a 'TextView' to a 'EditText'.
> The text did NOTellipsize.
>
> <EditText
>         android:text="Lorem ipsum dolor sit amet, consectetur
> adipisicing elit, sed
> do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
> ad minim
> veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
> ea commodo
> consequat. Duis aute irure dolor in reprehenderit in voluptate velit
> esse cillum
> dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
> proident, sunt
> in culpa qui officia deserunt mollit anim id est laborum."
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content"
>         android:singleLine="true"
>         android:ellipsize="end" />
>
> Why? And if an 'EditText' view above didn't ellipsized then I
> certainly wouldn't expect the 'AutoCompleteTextView' toellipsize.
> Seems there is a bug here somewhere.
>
> On Sep 23, 6:01 pm, "Chris W." <[email protected]> wrote:
>
>
>
> > I have a layout that includes the following:
>
> > <AutoCompleteTextView
> >      android:id="@+id/search_code"
> >      android:layout_width="fill_parent"
> >      android:layout_height="wrap_content"
> >      android:selectAllOnFocus="true"
> >      android:completionThreshold="2"
> >      android:maxLength="60"
> >      android:singleLine="true"
> >      android:ellipsize="end"
> >      android:imeOptions="actionDone"/>
>
> > Up until 1.6 theellipsizeattribute on my view above functions as I
> > would expect. Since upgrading to 1.6 theellipsizeattribute,
> > regardless of what I set it to (start, middle, end) seems to be
> > ignored.
>
> > Any hints and/or recommendations?

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