I came across this ticket :
http://code.google.com/p/android/issues/detail?id=882

The bottom entry highlights concerns that the only way to ellipsize a
view is to use the 'singleLine' or 'inputType' attributes. I tried
these and was able to get a text view element to ellipsize but only
with the 'singleLine' attribute. 'inputType=text' didn't work to
ellipsize the 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 NOT ellipsize.

<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' to ellipsize.
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 the ellipsize attribute on my view above functions as I
> would expect. Since upgrading to 1.6 the ellipsize attribute,
> 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