[mono-android] binding android library porject to xamarin android

venkatesh venkatesh.r at sierratec.com
Thu Dec 5 11:41:38 UTC 2013


We have implemented the Pull to refresh and load more android library
project into xamarin application. 
For this ,
we have created xamarin android binding project using binding mechanism.

the below method in android library project is not added in xamarin binding

         * Register a callback to be invoked when this list should be
         * @param onRefreshListener 
         *            The callback to run. 
        public void setOnRefreshListener(OnRefreshListener
onRefreshListener) { 
                mOnRefreshListener = onRefreshListener; 

**Java Interface** 

         * Interface definition for a callback to be invoked when list
should be 
         * refreshed. 
        public interface OnRefreshListener { 
                 * Called when the list should be refreshed. 
                 * <p>
                 * A call to {@link PullToRefreshListView
#onRefreshComplete()} is 
                 * expected to indicate that the refresh has completed. 
                public void onRefresh(); 


We need to call the above method  called setOnRefreshListener on ListView in
xamarin application project. 
But we could not able to call setOnRefreshListener in C# code. 

//C# implementation on listview 

public class ResfreshListener : Java.Lang.Object,
            public void OnRefresh() 
                Log.Info("PullToRefreshListViewDemo", "Test"); 

listview.**setOnRefreshListener**(new ResfreshListener () )

Error thrown  calling setOnRefreshListener on listview. 
are you missing a using directive or an assembly reference?

setOnRefreshListener method is not generated in api.xml file  and class

api file                     :  api.xml
generated class file    : 

Please guide me on the above issue.


View this message in context: http://mono-for-android.1047100.n5.nabble.com/binding-android-library-porject-to-xamarin-android-tp5713632.html
Sent from the Mono for Android mailing list archive at Nabble.com.

More information about the Monodroid mailing list