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

SwipeToRefreshLayout on Android using forms renderer issues

$
0
0

So I am making a pull (swipe) to refresh component using the Android.Support.V4.Widget on Android. I can get the renderer to create the SwipeToRefreshLayout and add it to the UI from my renderer. The swipe runs great and I get a Refresh event fired that I can invoke my ICommand from. However, how do I add Xaml content to the created layout? I tried subclassing the Xamarin.Forms.ContentView but that gives me errors when I try to get the IVisualElementRender about SetElement not creating the correct number of children. So I changed my forms control to derive from Xamarin.Forms.View and adding my own content property but that does not render anything!

If I can get it to work it would complement the iOS pull to refresh that other people have posted. It does make the Xaml less efficient as you have to wrap your content in another container but its a small compromise to have pull/swipe on iOS and Android.

So I guess what I am asking is how are we supposed to render our own content controls? Or even CAN we?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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