[mono-android] Java Interface type to c# binding

2013-12-04 Thread venkatesh
Hi,

We have implemented the Pull to refresh and load more android library
project into xamarin application.
In android java project , we have an  OnRefreshListener interface.

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

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

}

We need to call interface called OnRefreshListener on ListView in xamarin
application project.
But we could not able to call OnRefreshListener in C# code.

*Code snippets for java code to list view .*

// Set a listener to be invoked when the list should be refreshed.
((PullAndLoadListView) getListView())
.setOnRefreshListener(new OnRefreshListener() {

public void onRefresh() {
// Do work to refresh the list 
here.
new 
PullToRefreshDataTask().execute();
}
});

But we need to call the above java code  to xamarin android in C#

Please suggest me on this.

Thanks








--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Java-Interface-type-to-c-binding-tp5713630.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Java Interface type to c# binding

2013-12-04 Thread venkatesh
Hi,

kindly give me some valuable suggestions on this issue.

//Java Class on List View

// Set a listener to be invoked when the list should be refreshed. 
((PullAndLoadListView) getListView()) 
.setOnRefreshListener(new
OnRefreshListener(){} )

//C# implementation on listview

listview.*setOnRefreshListener*(new OnRefreshListener() {} )

Error thrown  calling setOnRefreshListener on listview.

'Com.Costum.Android.Widget.PullAndLoadListView' does not contain a
definition for '*SetOnRefreshListner*' and no extension method
'SetOnRefreshListner' accepting a first argument of type
'Com.Costum.Android.Widget.PullAndLoadListView' could be found (are you
missing a using directive or an assembly reference?)

Please guide me on this issue since  i am struggeld to solve this issue.

For your reference 

api file  :  api.xml
  

Generated c# file  :  Com.Costum.Android.Widget.PullToRefreshListView.cs

  



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Java-Interface-type-to-c-binding-tp5713630p5713631.html
Sent from the Mono for Android mailing list archive at Nabble.com.
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid