如何启动代码下面的活动?

时间:2016-05-23 11:59:52

标签: android xamarin xamarin.android

如何在代码下面启动活动?

adaptor.AddFragmentView((i, v, b) =>
     {
         View rootView = i.Inflate(Resource.Layout.TrafficReports, v, false);

         return rootView;                       
     }
 );

1 个答案:

答案 0 :(得分:0)

试试这个:

adaptor.AddFragmentView((i, v, b) =>
{
   View rootView = i.Inflate(Resource.Layout.TrafficReports, v, false);
   rootView.Context?.StartActivity(typeof(ActivityX));

   return rootView;
});