错误:无法创建抽象类或接口的实例
tablayout.SetOnTabSelectedListener(new TabLayout.IOnTabSelectedListener()
{
});
最佳答案
尝试这个:
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.Main);
var tabLayout = FindViewById<TabLayout>(Resource.Id.tab);
tabLayout.TabSelected += (object sender, TabLayout.TabSelectedEventArgs e) =>
{
var tab = e.Tab;
};
}
关于android - 在Xamarin Android上使用TabLayout的SetOnTabSelectdListerner?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37795785/