DetailTextLabel Cutoff

Thread is closed for posting
2 posts, 0 answers
  1. Trevor
    Trevor avatar
    22 posts
    Member since:
    Feb 2017

    Posted 07 Apr 2017 Link to this post


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


    1.public override TKListViewCell CellForItem(TKListView listView, NSIndexPath indexPath)
    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;


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



  2. Deyan
    Deyan avatar
    2147 posts

    Posted 12 Apr 2017 Link to this post


    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.

    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.
Back to Top