DetailTextLabel Cutoff

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

    Posted 07 Apr Link to this post

    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.

     

     

  2. Deyan
    Admin
    Deyan avatar
    2147 posts

    Posted 12 Apr Link to this post

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