This is a migrated thread and some comments may be shown as answers.

DetailTextLabel Cutoff

1 Answer 33 Views
ListView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Trevor
Top achievements
Rank 1
Trevor asked on 07 Apr 2017, 03:21 PM

Hi,

I am using the ListView and defining a cell like so:

 

1.public override TKListViewCell CellForItem(TKListView listView, NSIndexPath indexPath)
2.{
3.    TKListViewCell cell = listView.DequeueReusableCell("cell", indexPath) as TKListViewCell;
4.    cell.TextLabel.Text = this.owner.AssetIdentifiers.GetItem<NSString>((uint)indexPath.Row);
5.    cell.DetailTextLabel.Text = this.owner.SiteNames.GetItem<NSString>((uint)indexPath.Row);
6.    cell.DetailTextLabel.Font.WithSize(new nfloat(10.0));
7.    return cell;
8.}

 

When I do this, the DetailTextLabel gets cutoff (screenshot attached) how do I fix this? Seems like a bug.

 

 

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 12 Apr 2017, 07:35 AM
Hello,

Thanks for writing.

As far as I can see you are using Xamarin.iOS - these are not the correct forums to post your inquiry. It is advisable to use the dedicated Xamarin forums.

As to your question: you will need to explicitly define the height for your items when you increase the font of the detail text to accommodate it. This is done by setting the itemSize property on the ListView layout object.

I hope this helps.

Regards,
Deyan
Telerik by Progress
Want to build beautiful Android apps as well? Check out UI for Android which enables the same set of scenarios, allowing you to create the same great app experience on both iOS and Android.
Tags
ListView
Asked by
Trevor
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or