[android-developers] Re: ellipsize not working with TextView
Try changing the TextView's width from wrap_content to 0dip. On Mon, Jan 26, 2009 at 4:13 PM, Mark Nuetzmann wrote: > > I am using the following to create a layout that is inflated and used > in a ListView. The text in the first TextView gets truncated but I do > not get the "..." added as I expected. What do I not have set > correctly? Or is this a known problem... > > > xmlns:android="http://schemas.android.com/apk/res/android"; >android:orientation="horizontal" >android:layout_width="fill_parent" >android:layout_height="wrap_content"> > >android:layout_height="wrap_content" >android:layout_width="wrap_content" >android:layout_marginLeft="20px" >android:layout_weight="1" >android:layout_gravity="center_vertical" >android:text="This text will not fit in the space allowed" >android:textSize="20.0sp" >android:maxLines="1" >android:ellipsize="end" >/> >android:layout_width="40px" >android:layout_height="30px" >android:layout_gravity="center_vertical" >android:gravity="right|center_vertical" >android:text="5" >android:textSize="20.0sp" >android:layout_marginRight="5sp" >android:paddingRight="5sp" >/> > > > > -- 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 -~--~~~~--~~--~--~---
[android-developers] Re: ellipsize not working with TextView
just tried that. no change. Still does not display the "...", just truncates the text. On Jan 26, 6:15 pm, Romain Guy wrote: > Try changing the TextView's width from wrap_content to 0dip. > > On Mon, Jan 26, 2009 at 4:13 PM, Mark Nuetzmann > > > > wrote: > > > I am using the following to create a layout that is inflated and used > > in a ListView. The text in the first TextView gets truncated but I do > > not get the "..." added as I expected. What do I not have set > > correctly? Or is this a known problem... > > > > > > xmlns:android="http://schemas.android.com/apk/res/android"; > > android:orientation="horizontal" > > android:layout_width="fill_parent" > > android:layout_height="wrap_content"> > > > > android:layout_height="wrap_content" > > android:layout_width="wrap_content" > > android:layout_marginLeft="20px" > > android:layout_weight="1" > > android:layout_gravity="center_vertical" > > android:text="This text will not fit in the space allowed" > > android:textSize="20.0sp" > > android:maxLines="1" > > android:ellipsize="end" > > /> > > > android:layout_width="40px" > > android:layout_height="30px" > > android:layout_gravity="center_vertical" > > android:gravity="right|center_vertical" > > android:text="5" > > android:textSize="20.0sp" > > android:layout_marginRight="5sp" > > android:paddingRight="5sp" > > /> > > > > -- > 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 -~--~~~~--~~--~--~---
[android-developers] Re: ellipsize not working with TextView
Hi Mark, Try android:singleLine="true" instead of android:maxLines="1" Cheers, James On Mon, Jan 26, 2009 at 7:48 PM, Mark Nuetzmann wrote: > > just tried that. no change. Still does not display the "...", just > truncates the text. > > On Jan 26, 6:15 pm, Romain Guy wrote: >> Try changing the TextView's width from wrap_content to 0dip. >> >> On Mon, Jan 26, 2009 at 4:13 PM, Mark Nuetzmann >> >> >> >> wrote: >> >> > I am using the following to create a layout that is inflated and used >> > in a ListView. The text in the first TextView gets truncated but I do >> > not get the "..." added as I expected. What do I not have set >> > correctly? Or is this a known problem... >> >> > >> > > >xmlns:android="http://schemas.android.com/apk/res/android"; >> >android:orientation="horizontal" >> >android:layout_width="fill_parent" >> >android:layout_height="wrap_content"> >> >> >> >android:layout_height="wrap_content" >> >android:layout_width="wrap_content" >> >android:layout_marginLeft="20px" >> >android:layout_weight="1" >> >android:layout_gravity="center_vertical" >> >android:text="This text will not fit in the space allowed" >> >android:textSize="20.0sp" >> >android:maxLines="1" >> >android:ellipsize="end" >> >/> >> >> >android:layout_width="40px" >> >android:layout_height="30px" >> >android:layout_gravity="center_vertical" >> >android:gravity="right|center_vertical" >> >android:text="5" >> >android:textSize="20.0sp" >> >android:layout_marginRight="5sp" >> >android:paddingRight="5sp" >> >/> >> > >> >> -- >> 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 -~--~~~~--~~--~--~---
[android-developers] Re: ellipsize not working with TextView
darn, that didn't work either. On Jan 27, 1:28 pm, James Yum wrote: > Hi Mark, > > Try android:singleLine="true" instead of android:maxLines="1" > > Cheers, > James > > On Mon, Jan 26, 2009 at 7:48 PM, Mark Nuetzmann > > wrote: > > > just tried that. no change. Still does not display the "...", just > > truncates the text. > > > On Jan 26, 6:15 pm, Romain Guy wrote: > >> Try changing the TextView's width from wrap_content to 0dip. > > >> On Mon, Jan 26, 2009 at 4:13 PM, Mark Nuetzmann > > >> wrote: > > >> > I am using the following to create a layout that is inflated and used > >> > in a ListView. The text in the first TextView gets truncated but I do > >> > not get the "..." added as I expected. What do I not have set > >> > correctly? Or is this a known problem... > > >> > > >> > >> > xmlns:android="http://schemas.android.com/apk/res/android"; > >> > android:orientation="horizontal" > >> > android:layout_width="fill_parent" > >> > android:layout_height="wrap_content"> > > >> > >> > android:layout_height="wrap_content" > >> > android:layout_width="wrap_content" > >> > android:layout_marginLeft="20px" > >> > android:layout_weight="1" > >> > android:layout_gravity="center_vertical" > >> > android:text="This text will not fit in the space allowed" > >> > android:textSize="20.0sp" > >> > android:maxLines="1" > >> > android:ellipsize="end" > >> > /> > >> > >> > android:layout_width="40px" > >> > android:layout_height="30px" > >> > android:layout_gravity="center_vertical" > >> > android:gravity="right|center_vertical" > >> > android:text="5" > >> > android:textSize="20.0sp" > >> > android:layout_marginRight="5sp" > >> > android:paddingRight="5sp" > >> > /> > >> > > > >> -- > >> 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 -~--~~~~--~~--~--~---
[android-developers] Re: ellipsize not working with TextView
This is weird... It didn't work all day yesterday, but I just looked at it and it is now both truncating and ellipsizing correctly. I am using the singleLine="true" on the TextView. On Jan 27, 1:53 pm, Mark Nuetzmann wrote: > darn, that didn't work either. > > On Jan 27, 1:28 pm, James Yum wrote: > > > Hi Mark, > > > Try android:singleLine="true" instead of android:maxLines="1" > > > Cheers, > > James > > > On Mon, Jan 26, 2009 at 7:48 PM, Mark Nuetzmann > > > wrote: > > > > just tried that. no change. Still does not display the "...", just > > > truncates the text. > > > > On Jan 26, 6:15 pm, Romain Guy wrote: > > >> Try changing the TextView's width from wrap_content to 0dip. > > > >> On Mon, Jan 26, 2009 at 4:13 PM, Mark Nuetzmann > > > >> wrote: > > > >> > I am using the following to create a layout that is inflated and used > > >> > in a ListView. The text in the first TextView gets truncated but I do > > >> > not get the "..." added as I expected. What do I not have set > > >> > correctly? Or is this a known problem... > > > >> > > > >> > > >> > xmlns:android="http://schemas.android.com/apk/res/android"; > > >> > android:orientation="horizontal" > > >> > android:layout_width="fill_parent" > > >> > android:layout_height="wrap_content"> > > > >> > > >> > android:layout_height="wrap_content" > > >> > android:layout_width="wrap_content" > > >> > android:layout_marginLeft="20px" > > >> > android:layout_weight="1" > > >> > android:layout_gravity="center_vertical" > > >> > android:text="This text will not fit in the space > > >> > allowed" > > >> > android:textSize="20.0sp" > > >> > android:maxLines="1" > > >> > android:ellipsize="end" > > >> > /> > > >> > > >> > android:layout_width="40px" > > >> > android:layout_height="30px" > > >> > android:layout_gravity="center_vertical" > > >> > android:gravity="right|center_vertical" > > >> > android:text="5" > > >> > android:textSize="20.0sp" > > >> > android:layout_marginRight="5sp" > > >> > android:paddingRight="5sp" > > >> > /> > > >> > > > > >> -- > > >> 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 -~--~~~~--~~--~--~---