Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Problem with PageRenderer

$
0
0

For Android project I have a jar package that contains a method "ShowView". This method get ViewGroup and should add his View to this ViewContainer.
I have Xamarin.Forms project and for this I create PageRenderer in Droid project, but when this screen is run I get "unhandled exception"..
I can not understand what the matter. In debug I see, that the method add View to ViewGroup successfully.

` public class FastPayRenderer : PageRenderer
{

protected override void OnElementChanged(ElementChangedEventArgs e)
{
base.OnElementChanged(e);

      var activity = this.Context as Activity;


      FastPay.SharedInstance().Init(activity, "1234","1111111", FastPayEnvironment.FastPayEnvironmentDev);

      var layoutPar = new LayoutParams(LayoutParams.MatchParent, LayoutParams.MatchParent);
      FastPayServiceParameter fastPayServiceParam = new FastPayServiceParameter();
      FastPayResult res = new FastPayResult();

      FastPay.SharedInstance().ShowView(FastPayService.FastPayRegistrationService, fastPayServiceParam, this.ViewGroup, layoutPar, "fastPayApiHandLerMethodName", res);


  }

}`


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>