修改
This commit is contained in:
parent
570efd83da
commit
b22e44a0e3
@ -3,41 +3,29 @@ using System.Collections.Generic;
|
||||
|
||||
namespace AlicizaX.UI.RecyclerView
|
||||
{
|
||||
public class MixedAdapter : Adapter<MixedData>
|
||||
public class MixedAdapter : Adapter<IMixedData>
|
||||
{
|
||||
public MixedAdapter(RecyclerView recyclerView) : base(recyclerView)
|
||||
{
|
||||
}
|
||||
|
||||
public MixedAdapter(RecyclerView recyclerView, List<MixedData> list) : base(recyclerView, list)
|
||||
public MixedAdapter(RecyclerView recyclerView, List<IMixedData> list) : base(recyclerView, list)
|
||||
{
|
||||
}
|
||||
|
||||
public MixedAdapter(RecyclerView recyclerView, List<MixedData> list, Action<MixedData> onItemClick) : base(recyclerView, list, onItemClick)
|
||||
public MixedAdapter(RecyclerView recyclerView, List<IMixedData> list, Action<IMixedData> onItemClick) : base(recyclerView, list, onItemClick)
|
||||
{
|
||||
}
|
||||
|
||||
public override string GetViewName(int index)
|
||||
{
|
||||
return list[index].viewName;
|
||||
return list[index].TemplateName;
|
||||
}
|
||||
}
|
||||
|
||||
public class MixedData
|
||||
public interface IMixedData
|
||||
{
|
||||
public string viewName;
|
||||
public string name;
|
||||
public string icon;
|
||||
public int number;
|
||||
public int percent;
|
||||
string TemplateName { get; set; }
|
||||
}
|
||||
|
||||
public MixedData(string viewName, string name, string icon, int number, int percent)
|
||||
{
|
||||
this.viewName = viewName;
|
||||
this.name = name;
|
||||
this.icon = icon;
|
||||
this.number = number;
|
||||
this.percent = percent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user