Forum Xamarin.Forms

Parts of RelativeLayout not showing with TranslateX

ThomasNasbyThomasNasby USMember ✭✭

I'm creating a custom ListView that is a StackLayout (list) containing a bunch of RelativeLayouts (the list items). I want to add the ability to swipe the list items to show more options. I need to do this custom because the list items are not uniform at all and the list must look the same on iOS and Android.

I have 2 solutions that each have a problem. Here is how I add the extra options to my RelativeLayout. Notice they go beyond the bounds of the RelativeLayout.

                            Constraint.RelativeToParent(parent => parent.Width ),


First I added the RelativeLayout to a ScrollView and everything shows up fine, the problem is I don't want the user to be able to scroll the list item, I want them to swipe it to show more options (using ScrollToAsync). So is there a way to disable scroll on a ScrollView? I know that sounds silly..

So then I tried removing the ScrollView and just having the RelativeLayout. The swiping works great now, however the overflow of the view (the additional options) are now not showing when I do TranslateTo to the view, as can be seen in the pic.

How do I get the entire view to render so using TranslateTo will show the options? Or how can I disable the scrolling of a ScrollView?


Sign In or Register to comment.