Binding a custom native control

ckristhoffckristhoff Member
edited June 19 in Xamarin.Forms

Hi everyone
I'm trying to integrate a custom native control Android (also iOS but later). But app does not display the control.
First, I binded the library using a Xamarin Android Link Library named "athmovil_checkout.Android".
Next, in main project:

<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="urls not allowed by the forum... sorry /schemas/2014/forms"
  xmlns:x="urls not allowed by the forum... sorry winfx/2009/xaml"
  xmlns:athmovilAndroid="clr-namespace:athmovil_checkout.Android;assembly=athmovil_checkout.Android;targetPlatform=Android"
  xmlns:androidLocal="clr-namespace:TestATHMovil.Droid;assembly=TestATHMovil.Droid;targetPlatform=Android"
  xmlns:d="urls not allowed by the forum... sorry /schemas/2014/forms/design"
  xmlns:mc="urls not allowed by the forum... sorry /markup-compatibility/2006"
  mc:Ignorable="d"
  x:Class="TestATHMovil.MainPage">
  <StackLayout Margin="20">
    <Label x:Name="lblTest"
      Text="Welcome to Xamarin.Forms!" />
    <athmovilAndroid:com.evertecinc.athmovil.sdk.checkout.PayButton Clicked="OnButtonClicked"
      x:Arguments="{x:Static androidLocal:MainActivity.Instance}" />
  </StackLayout>
</ContentPage>

App runs without problems but it does not show the custom button. :(

The library recommends implement like that (Android native app):

    <com.evertecinc.athmovil.sdk.checkout.PayButton android:onClick="onClickPayButton"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        app:style="light"
        app:language="espanol" />

I tried with native android controls (Android.Widgets) and works great.

Answers

Sign In or Register to comment.