Skip to content

this loopScrollView how to match the widget height? #1

@HelloCSharpe

Description

@HelloCSharpe

if my LoopBaseItem , its widget height is always changed, this project cant work well. How to match item height Perfect? can you solve this problem?Thanks~

my LoopBaseItem Scripts
eg:
public class RankItem : LoopBaseItem {
private UILabel lbRankNo;
private UIWidget widget;
private static int _height = 30;
protected override void OnAwake()
{
this.lbRankNo = this.GetComponentInChildren();
this.widget = this.GetComponent();
}

public override void UpdateData(object updateData)
{
    _height += 2;
    widget.height = _height;
    if (updateData is RankItemData)
    {
        RankItemData data = updateData as RankItemData;
        this.lbRankNo.text = data.rank.ToString();
    }
}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions