MVVM cross binding for native library custom controls

VigneshViswanathanVigneshViswanathan ✭✭USMember ✭✭

Hi,

We have created a custom control in android platform(in Android Studio) and shipped to xamarin through Binding projects. Now we are trying to use MVVMCross on the custom controls but it is not working. The MVVMcross is working for the TextViews,Buttons etc., but it is not working for our custom control(from native library).

The below code works fine

<EditText
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textSize="40dp"
    local:MvxBind="Text MyValue" />

but our custom control (from native android)

<com.company.mvvmtest.MVVMTest
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       local:MvxBind="TextProperty MyValue">
    </com.company.mvvmtest.MVVMTest>

is not working.

We have tried a simple control in Xamarin.Android and tested for MVVMCross

<CustomView
       android:layout_width="fill_parent"
       android:layout_height="50dp"
    local:MvxBind="MyProperty MyValue" />

even this works fine. But control created in native and shipped using binding project is not working.

Whether MVVMCross does not support the custom controls created in native Android.? or do we missing anything.?

Any suggestions will be helpful. Thanks.

Answers

Sign In or Register to comment.