You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.3 KiB
53 lines
1.3 KiB
using System; |
|
using UIWidgets; |
|
|
|
namespace UIWidgetsSamples { |
|
|
|
public class ListViewCustomSample : ListViewCustom<ListViewCustomSampleComponent,ListViewCustomSampleItemDescription> { |
|
bool isStartedListViewCustomSample = false; |
|
|
|
Comparison<ListViewCustomSampleItemDescription> itemsComparison = (x, y) => { |
|
return x.Name.CompareTo(y.Name); |
|
}; |
|
|
|
protected override void Awake() |
|
{ |
|
Start(); |
|
} |
|
|
|
public override void Start() |
|
{ |
|
if (isStartedListViewCustomSample) |
|
{ |
|
return ; |
|
} |
|
isStartedListViewCustomSample = true; |
|
|
|
base.Start(); |
|
DataSource.Comparison = itemsComparison; |
|
} |
|
|
|
protected override void SetData(ListViewCustomSampleComponent component, ListViewCustomSampleItemDescription item) |
|
{ |
|
component.SetData(item); |
|
} |
|
|
|
protected override void HighlightColoring(ListViewCustomSampleComponent component) |
|
{ |
|
base.HighlightColoring(component); |
|
component.Text.color = HighlightedColor; |
|
} |
|
|
|
protected override void SelectColoring(ListViewCustomSampleComponent component) |
|
{ |
|
base.SelectColoring(component); |
|
component.Text.color = SelectedColor; |
|
} |
|
|
|
protected override void DefaultColoring(ListViewCustomSampleComponent component) |
|
{ |
|
base.DefaultColoring(component); |
|
component.Text.color = DefaultColor; |
|
} |
|
} |
|
} |