2025-03-12 20:59:12 +08:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
2025-11-20 15:40:38 +08:00
|
|
|
namespace AlicizaX.UI
|
2025-03-12 20:59:12 +08:00
|
|
|
{
|
2025-11-20 15:40:38 +08:00
|
|
|
public class MixedAdapter<TData> : Adapter<TData> where TData : IMixedViewData
|
2025-03-12 20:59:12 +08:00
|
|
|
{
|
|
|
|
|
public MixedAdapter(RecyclerView recyclerView) : base(recyclerView)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-20 15:40:38 +08:00
|
|
|
public MixedAdapter(RecyclerView recyclerView, List<TData> list) : base(recyclerView, list)
|
2025-03-12 20:59:12 +08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string GetViewName(int index)
|
|
|
|
|
{
|
2026-03-31 15:18:50 +08:00
|
|
|
return index >= 0 && list != null && index < list.Count
|
|
|
|
|
? list[index].TemplateName
|
|
|
|
|
: string.Empty;
|
2025-03-12 20:59:12 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|