@MatthiasPorges said:
Is it possible to disable changing Position? Or swiping between Positions altogether?
Background: I have a control in a CarouselView that enables zooming and panning when it's being interacted with. I want to disable changing Position of the CarouselView during that, as it may happen by accident.
Edit: I did implement this on iOS with a custom renderer using "Control.ScrollEnabled". Still would like a Forms solution for Android and UWP.
For Android, I know you can call RequestDisallowInterceptTouchEvent(true) from the CarouselView or this.Parent.RequestDisallowInterceptTouchEvent(true) from a child of the CarouselView to prevent it from scrolling. Hope that helps you.
I`m trying to convert my CarouselPage to a CarouselView. In my CarouselPage i have some ContentPages, which i transformed to ContentViews. Now i added the ContentViews to the CarouselView.
<forms:CarouselView ItemsSource="{Binding ContentViews}">
<forms:CarouselView.ItemTemplate>
<DataTemplate>
<ContentView Content="{Binding Content}" />/
</DataTemplate>
</forms:CarouselView.ItemTemplate>
</forms:CarouselView>
private List<ContentView> _contentViews;
public List<ContentView> ContentViews
{
get { return _contentViews; }
set { SetProperty(ref _contentViews, value); }
}
public TestVM(){{ContentViews = new List<ContentView> { new Selector(), new TestView(), new TestView{BindingContext = new TestViewModel()}}
It works fine, but i`m losing my databinding. Now i was wondering how i could bind a ViewModel to the Views in the Carousel View, or if i could bind them to the "Parent" Viewmodel of the Carousel.
@DavidOrtinau said:
UPDATE: We have a new release of this cooking and hope to be able to share that progress with you very soon. We need to finish tidying up a few API issues the team discussed yesterday and make sure we've addressed a few other things.
Hi, I don't mean to be ungrateful (you sharing your insight is certainly an improvement ), but it's been 3 weeks and there seems to be no change. Could we get some current update on the progress?
Also as was mentioned by others, is someone monitoring the issues on GitHub? There are some serious ones reported...
@AdrianKnight@BryanHunterXam@ThomasBurkhart@voidstream@DavidOrtinau
Here is a workaround/fix for ListView vertical scrolling problems inside CarouselView on Android.
Spent some time this morning identifying the problem and crafting a workaround. Needed a fix as we need to ship!
Parent view (RecyclerView used by CarouselView) is intercepting touch events, preventing propagation to the ListView.
To implement, simply create a custom renderer for ListView on Android and override the OnInterceptTouchEvent method.
Implementation looks something like this, tested working:
public override bool OnInterceptTouchEvent(MotionEvent ev)
{
if (ev.Action == MotionEventActions.Move)
{
Parent?.RequestDisallowInterceptTouchEvent(true);
}
return base.OnInterceptTouchEvent(ev);
}
To implement, simply create a custom renderer for ListView on Android and override the OnInterceptTouchEvent method.
Implementation looks something like this, tested working:
public override bool OnInterceptTouchEvent(MotionEvent ev)
{
if (ev.Action == MotionEventActions.Move)
{
Parent?.RequestDisallowInterceptTouchEvent(true);
}
return base.OnInterceptTouchEvent(ev);
}
Thanks, and can you drop me the fix of switch view lags? Please, we talk of that on another thread
@czPeP said:
Hi, I don't mean to be ungrateful (you sharing your insight is certainly an improvement ), but it's been 3 weeks and there seems to be no change. Could we get some current update on the progress?
Also as was mentioned by others, is someone monitoring the issues on GitHub? There are some serious ones reported...
We have reviewed the issues on GitHub and verified the updates we've been preparing for release fix those. Once we release, we'll be deprecating that repository.
Our focus on performance and stability in Forms, especially on Android, has delayed release of feature progress such as here on CarouselView.
We are preparing several releases now. I'll confirm timing and update here on what to expect.
There is a breaking error on Android with the CarouselView with 2.3.4.212-pre4. On the upside, the opacity issue is fixed!
Time Device Name Type PID Tag Message 03-12 19:11:19.142 5.5" Marshmallow (6.0.0) XXHDPI Phone Error 5677 AndroidRuntime --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <2b600c964e7e4311aabc95ee34a8aa98>:0 at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x000a7] in <dd3713ef7f1a46dfbffbab36a35c89e8>:0 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00020] in <dd3713ef7f1a46dfbffbab36a35c89e8>:0 at Android.Views.ViewGroup.Layout (System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0005f] in <905597eeb33c4c5090d50bf2166777b7>:0 at Xamarin.Forms.Platform.Android.ViewRenderer2[TView,TNativeView].OnLayout (System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x00059] in :0
at Xamarin.Forms.Platform.CarouselViewRenderer.OnLayout (System.Boolean changed, System.Int32 left, System.Int32 top, System.Int32 right, System.Int32 bottom) [0x00017] in <98ef4d3d8b214c838f1b190032afb88a>:0
at Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean p0, System.Int32 p1, System.Int32 p2, System.Int32 p3, System.Int32 p4) [0x00008] in <77b7e6f748c645c4adac78f920bf79b5>:0
at (wrapper dynamic-method) System.Object:fc5772e1-bebb-4a8b-9920-97c541a2e399 (intptr,intptr,bool,int,int,int,int)`
My main goal is to have a carousel page with same header and footer, so that I can load different control ?
Since carousel page is longer will be available in near future, i am trying to implement using carousel view. But it seems like carousel views only supports homogeneous controls with shared item source.
Just pointing out...
That ticket is marked as "Need Info"
A comment by another person reporting the same issue said they were trying to create a sample app that would reproduce it - but nothing has been added to the ticket.
If you want to see movement on a bug it would help if someone would provide a project that reproduces the error. The Xamarin folks can't fix a bug they can't reproduce. They're as overworked and underpaid as the rest of us. When faced with 1,000 issues to resolve they're going to do the same thing we do: Prioritize. The bug tickets with the most amount of help from those reporting are naturally going to be handled before the tickets where someone says "Its broke; you figure it out".
I would also point out that while the control should be robust and handle possible cases like a division by zero condition, the app developer should also take some responsibility for writing half-decent robust code as well. As @PhilippSumi said on that thread:
int position = x / _itemSize.Width + positionOrigin;
That does look brittle
It really doesn't take much for the app developer to do a little bit of value checking/validation. Check that your divisor is >0 and if its not set it to 1 - or just return out and not do anything.
If you look at it from a different perspective, the divisionbyzero error isn't wrong - Its an exception just like any other that tells the developer they screwed up. The developer sent bad values. That exception brings to light the problem in the developer's code so they can fix it. Is it really right that the control should just swallow up the bad value and NOT throw an exception? You don't expect a file system call to not throw an exception when the file isn't found: You get a FileNotFoundException and nobody considers that a bug in the System.IO.File class.
Edit: Posted the repro on Bugzilla. If the control is invisible due to its container being invisible, it crashes hard. Thing is that I really want that controller to be invisible...
The problem is that spending a lot of time on the repro might not make much sense when the StackTrace tells a lot, and the control has been in development outside of GitHub for months. I don't think anybody is going to try this out on the outdated sources.
I'm also not convinced we developers screwed up there. This just started crashing after the XF forms upgrade from pre2 to pre3, without any other changes. My Carousel just takes the screen once it's rendered, and I assume the rendering pipeline changed, so that the control's width is simply 0 when the crashing code runs.
Speaking of brittle: The next line isn't exactly better, with a mod operation on the width. This just begs to crash hard
hello, I think there is a bug in the IOs implementation, when removing items from the ItemSource collection of the carousel view. The collection is not updated properly and therefore newly added items are not shown.
For example: there is a collection 'Items' which contains a few items. Adding another one and removing one will cause an error.
ci = new CarouselInput
{
Title = "Work order items"
};
Items.Add(ci);
Items.RemoveAt(1);
and can be easily reproduced by adding the following code to James Montemagnos Monkeys Example (MonkeysPage.xaml.cs -> Handle_ItemSelected)
if (monkey == null)
{
return;
}
else
{
var vm = BindingContext as MonkeysViewModel;
if (vm.Zoos.Count > 2)
{
vm.Zoos.Add(
new Zoo
{
ImageUrl = "http://content.screencast.com/users/JamesMontemagno/folders/Jing/media/e8179889-8189-4acb-bac5-812611199a03/2016-06-02_1053.png",
Name = "Phoenix Zoo"
});
vm.Zoos.RemoveAt(1);
}
}
Can someone confirm this problem or has a workaround?
Is this component development dead?
Because it's a too useful component and it's sad that the latest available version is a Beta from about a year ago!
@ravero said:
Is this component development dead?
Because it's a too useful component and it's sad that the latest available version is a Beta from about a year ago!
Not dead. Looks like @alexrainman is implementing the control as the new carousel view
I talked to some of them at Build and what @lpdavies said is the same as what they said. I was told that you can just go ahead and use @alexrainman 's version and then switch over when the official one is release.
I'm using 2.3.0 pre2. Getting DivideByZeroException when a layout containing the CarouselView has it's visibility set to 'false' (trying to display an activity indicator whilst the images are loading).
Don't screw with the actual elements like that.
Grab Nuget package rg.plugins.popups, then you can put a "Busy" or "Loading" popup on screen while the loading takes place.
Much easier than micromanaging all the controls... And you can use that as a cover for the whole screen so the user can't tap other buttons while loading is taking place, and so on. That saves you from having to deal with 20 other issues that can creep in.
On UWP desktop, have you noticed that when you move mouse cursor outside of the carouselview, it makes a little flicker of the content ? (only the first time)
To implement, simply create a custom renderer for ListView on Android and override the OnInterceptTouchEvent method.
Implementation looks something like this, tested working:
public override bool OnInterceptTouchEvent(MotionEvent ev)
{
if (ev.Action == MotionEventActions.Move)
{
Parent?.RequestDisallowInterceptTouchEvent(true);
}
return base.OnInterceptTouchEvent(ev);
}
Thanks for this. It still wasn't 100% when testing on various android devices so tweaked it as shown here:
`
public class CustomListViewRenderer : ListViewRenderer
{
bool _moving = false;
float _prevX;
float _prevY;
public override bool OnInterceptTouchEvent(MotionEvent ev)
{
if (ev.Action == MotionEventActions.Move)
{
if (_moving)
{
// more vertical than horizontal
if (Math.Abs(ev.RawX - _prevX) < Math.Abs(ev.RawY - _prevY))
{
Parent?.RequestDisallowInterceptTouchEvent(true);
}
}
else
{
_moving = true;
}
_prevX = ev.RawX;
_prevY = ev.RawY;
}
if (ev.Action == MotionEventActions.Up || ev.Action == MotionEventActions.Cancel)
{
_moving = false;
_prevX = default(float);
_prevY = default(float);
}
return base.OnInterceptTouchEvent(ev);
}
}
@SatishBandre said:
How to Disable Gestures (swipe l/r) of Carousel View on button click event? I want to disable swipe gestures for drawing purpose in canvas.
You'll need to intercept the touch event in the renderer. How you do it depends on the platform.
@GraysonMoyer said:
Hello, I have been researching the best method for developing apps to fit the requirements of my company's clients. We mostly will be developing apps to interact with and receive data from instruments and devices that measure and control physical actions. Would using any particular app development process be more or less beneficial for our needs? Right now I am looking into Xamarin because of its cross platform capabilities, but will it be able to meet our application goals?
@GraysonMoyer said:
Hello, I have been researching the best method for developing apps to fit the requirements of my company's clients. We mostly will be developing apps to interact with and receive data from instruments and devices that measure and control physical actions. Would using any particular app development process be more or less beneficial for our needs? Right now I am looking into Xamarin because of its cross platform capabilities, but will it be able to meet our application goals?
This is the wrong thread for that sorry.
I apologize for that but honestly there really isn't a right thread for that and I just need general advice from anyone who uses Xamarin.
My app was crashed when update to XF 2.4. I have a List Itemsource Binding from Viewmodel. The item in list is a result await method. The itemsource was null when init ultil a await method return result.
My carousleview return error
JNI DETECTED ERROR IN APPLICATION: JNI Throw called with pending exception java.lang.IllegalArgumentException: itemView may not be null
10-03 06:11:30.967 F/art ( 7031): art/runtime/java_vm_ext.cc:470] (Throwable with no stack trace)
10-03 06:11:30.967 F/art ( 7031): art/runtime/java_vm_ext.cc:470] in call to Throw
10-03 06:11:30.967 F/art ( 7031): art/runtime/java_vm_ext.cc:470] from android.support.v7.widget.RecyclerView$ViewHolder md56987f6cc1cad2bad7d1513f02edd2700.ItemViewAdapter.n_onCreateViewHolder(android.view.ViewGroup, int)
Posts
For Android, I know you can call RequestDisallowInterceptTouchEvent(true) from the CarouselView or this.Parent.RequestDisallowInterceptTouchEvent(true) from a child of the CarouselView to prevent it from scrolling. Hope that helps you.
-DELETE-
I`m trying to convert my CarouselPage to a CarouselView. In my CarouselPage i have some ContentPages, which i transformed to ContentViews. Now i added the ContentViews to the CarouselView.
It works fine, but i`m losing my databinding. Now i was wondering how i could bind a ViewModel to the Views in the Carousel View, or if i could bind them to the "Parent" Viewmodel of the Carousel.
-DELETE-
Any ETA for the Final version of the CarouselView?
The GitHub repo is quite
Hi, I don't mean to be ungrateful (you sharing your insight is certainly an improvement
), but it's been 3 weeks and there seems to be no change. Could we get some current update on the progress?
Also as was mentioned by others, is someone monitoring the issues on GitHub? There are some serious ones reported...
@AdrianKnight @BryanHunterXam @ThomasBurkhart @voidstream @DavidOrtinau
Here is a workaround/fix for
ListView
vertical scrolling problems insideCarouselView
on Android.Spent some time this morning identifying the problem and crafting a workaround. Needed a fix as we need to ship!
To implement, simply create a custom renderer for ListView on Android and override the
OnInterceptTouchEvent
method.Implementation looks something like this, tested working:
Thanks, and can you drop me the fix of switch view lags? Please, we talk of that on another thread
We have reviewed the issues on GitHub and verified the updates we've been preparing for release fix those. Once we release, we'll be deprecating that repository.
Our focus on performance and stability in Forms, especially on Android, has delayed release of feature progress such as here on CarouselView.
We are preparing several releases now. I'll confirm timing and update here on what to expect.
There is a breaking error on Android with the CarouselView with 2.3.4.212-pre4. On the upside, the opacity issue is fixed!
Time Device Name Type PID Tag Message 03-12 19:11:19.142 5.5" Marshmallow (6.0.0) XXHDPI Phone Error 5677 AndroidRuntime --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <2b600c964e7e4311aabc95ee34a8aa98>:0 at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x000a7] in <dd3713ef7f1a46dfbffbab36a35c89e8>:0 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00020] in <dd3713ef7f1a46dfbffbab36a35c89e8>:0 at Android.Views.ViewGroup.Layout (System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0005f] in <905597eeb33c4c5090d50bf2166777b7>:0 at Xamarin.Forms.Platform.Android.ViewRenderer
2[TView,TNativeView].OnLayout (System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x00059] in :0at Xamarin.Forms.Platform.CarouselViewRenderer.OnLayout (System.Boolean changed, System.Int32 left, System.Int32 top, System.Int32 right, System.Int32 bottom) [0x00017] in <98ef4d3d8b214c838f1b190032afb88a>:0
at Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean p0, System.Int32 p1, System.Int32 p2, System.Int32 p3, System.Int32 p4) [0x00008] in <77b7e6f748c645c4adac78f920bf79b5>:0
at (wrapper dynamic-method) System.Object:fc5772e1-bebb-4a8b-9920-97c541a2e399 (intptr,intptr,bool,int,int,int,int)`
@Velocity
Thanks for your help.
My app started crashing reliably on CarouselView after upgrading from pre2 with a DivideByZeroException.
https://bugzilla.xamarin.com/show_bug.cgi?id=53382
Xamarin caused by: android.runtime.JavaProxyThrowable: System.DivideByZeroException: Attempted to divide by zero.
Xamarin.Forms.Platform.CarouselViewRenderer.VirtualLayoutManager.GetPosition(int itemCount, int positionOrigin, int x, bool exclusive)<98ef4d3d8b214c838f1b190032afb88a>:0
Xamarin.Forms.Platform.CarouselViewRenderer.VirtualLayoutManager.GetPositions(int positionOrigin, int itemCount, Rectangle viewport)<98ef4d3d8b214c838f1b190032afb88a>:0
Xamarin.Forms.Platform.PhysicalLayoutManager.OnLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state)<98ef4d3d8b214c838f1b190032afb88a>:0
Android.Support.V7.Widget.RecyclerView.LayoutManager.n_OnLayoutChildren_Landroid_support_v7_widget_RecyclerView_Recycler_Landroid_support_v7_widget_RecyclerView_State_(IntPtr jnienv, IntPtr native__this, IntPtr native_recycler, IntPtr native_state)<62f1973e22584368bc73846a0798f0bd>:0
at (wrapper dynamic-method) System.Object:7ce69b0c-299c-4729-9d79-93780c44dcbd (intptr,intptr,intptr,intptr)
md56987f6cc1cad2bad7d1513f02edd2700.PhysicalLayoutManager.n_onLayoutChildren(Native Method)
md56987f6cc1cad2bad7d1513f02edd2700.PhysicalLayoutManager.onLayoutChildren()PhysicalLayoutManager.java:149
android.support.v7.widget.RecyclerView.dispatchLayoutStep2()RecyclerView.java:3506
android.support.v7.widget.RecyclerView.dispatchLayout()RecyclerView.java:3254
android.support.v7.widget.RecyclerView.onLayout()RecyclerView.java:3767
android.view.View.layout()View.java:17945
android.view.ViewGroup.layout()ViewGroup.java:5812
md56987f6cc1cad2bad7d1513f02edd2700.CarouselViewRenderer.n_onLayout(Native Method)
md56987f6cc1cad2bad7d1513f02edd2700.CarouselViewRenderer.onLayout()CarouselViewRenderer.java:45
android.view.View.layout()View.java:17945
android.view.ViewGroup.layout()ViewGroup.java:5812
com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout()FormsViewGroup.java:29
md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.n_onLayout(Native Method)
md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.onLayout()VisualElementRenderer_1.java:58
android.view.View.layout()View.java:17945
android.view.ViewGroup.layout()ViewGroup.java:5812
com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout()FormsViewGroup.java:29
md5270abb39e60627f0f200893b490a1ade.NavigationPageRenderer.n_onLayout(Native Method)
md5270abb39e60627f0f200893b490a1ade.NavigationPageRenderer.onLayout()NavigationPageRenderer.java:65
android.view.View.layout()View.java:17945
android.view.ViewGroup.layout()ViewGroup.java:5812
com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout()FormsViewGroup.java:29
md5270abb39e60627f0f200893b490a1ade.MasterDetailContainer.n_onLayout(Native Method)
md5270abb39e60627f0f200893b490a1ade.MasterDetailContainer.onLayout()MasterDetailContainer.java:53
android.view.View.layout()View.java:17945
android.view.ViewGroup.layout()ViewGroup.java:5812
android.support.v4.widget.DrawerLayout.onLayout()DrawerLayout.java:1193
md5270abb39e60627f0f200893b490a1ade.MasterDetailPageRenderer.n_onLayout(Native Method)
md5270abb39e60627f0f200893b490a1ade.MasterDetailPageRenderer.onLayout()MasterDetailPageRenderer.java:68
android.view.View.layout()View.java:17945
android.view.ViewGroup.layout()ViewGroup.java:5812
md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.n_onLayout(Native Method)
md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.onLayout()PlatformRenderer.java:63
android.view.View.layout()View.java:17945
android.view.ViewGroup.layout()ViewGroup.java:5812
android.widget.RelativeLayout.onLayout()RelativeLayout.java:1080
android.view.View.layout()View.java:17945
android.view.ViewGroup.layout()ViewGroup.java:5812
android.widget.FrameLayout.layoutChildren()FrameLayout.java:344
android.widget.FrameLayout.onLayout()FrameLayout.java:281
android.view.View.layout()View.java:17945
android.view.ViewGroup.layout()ViewGroup.java:5812
android.widget.LinearLayout.setChildFrame()LinearLayout.java:1742
android.widget.LinearLayout.layoutVertical()LinearLayout.java:1585
android.widget.LinearLayout.onLayout()LinearLayout.java:1494
android.view.View.layout()View.java:17945
android.view.ViewGroup.layout()ViewGroup.java:5812
android.widget.FrameLayout.layoutChildren()FrameLayout.java:344
android.widget.FrameLayout.onLayout()FrameLayout.java:281
com.android.internal.policy.PhoneWindow$DecorView.onLayout()PhoneWindow.java:3178
android.view.View.layout()View.java:17945
android.view.ViewGroup.layout()ViewGroup.java:5812
android.view.ViewRootImpl.performLayout()ViewRootImpl.java:2716
android.view.ViewRootImpl.performTraversals()ViewRootImpl.java:2417
android.view.ViewRootImpl.doTraversal()ViewRootImpl.java:1487
android.view.ViewRootImpl$TraversalRunnable.run()ViewRootImpl.java:7450
android.view.Choreographer$CallbackRecord.run()Choreographer.java:920
android.view.Choreographer.doCallbacks()Choreographer.java:695
android.view.Choreographer.doFrame()Choreographer.java:631
android.view.Choreographer$FrameDisplayEventReceiver.run()Choreographer.java:906
android.os.Handler.handleCallback()Handler.java:739
android.os.Handler.dispatchMessage()Handler.java:95
android.os.Looper.loop()Looper.java:158
android.app.ActivityThread.main()ActivityThread.java:7229
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:1230
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:1120
Somebody knows how can i do a Infinite Carousel with this Xamarin.Forms.CarouselView?
((
My main goal is to have a carousel page with same header and footer, so that I can load different control ?
Since carousel page is longer will be available in near future, i am trying to implement using carousel view. But it seems like carousel views only supports homogeneous controls with shared item source.
Still crashing with the DivideByZeroException on pre6:
https://bugzilla.xamarin.com/show_bug.cgi?id=53382
Just pointing out...
That ticket is marked as "Need Info"
A comment by another person reporting the same issue said they were trying to create a sample app that would reproduce it - but nothing has been added to the ticket.
If you want to see movement on a bug it would help if someone would provide a project that reproduces the error. The Xamarin folks can't fix a bug they can't reproduce. They're as overworked and underpaid as the rest of us. When faced with 1,000 issues to resolve they're going to do the same thing we do: Prioritize. The bug tickets with the most amount of help from those reporting are naturally going to be handled before the tickets where someone says "Its broke; you figure it out".
I would also point out that while the control should be robust and handle possible cases like a division by zero condition, the app developer should also take some responsibility for writing half-decent robust code as well. As @PhilippSumi said on that thread:
It really doesn't take much for the app developer to do a little bit of value checking/validation. Check that your divisor is
>0
and if its not set it to 1 - or justreturn
out and not do anything.If you look at it from a different perspective, the divisionbyzero error isn't wrong - Its an exception just like any other that tells the developer they screwed up. The developer sent bad values. That exception brings to light the problem in the developer's code so they can fix it. Is it really right that the control should just swallow up the bad value and NOT throw an exception? You don't expect a file system call to not throw an exception when the file isn't found: You get a
FileNotFoundException
and nobody considers that a bug in theSystem.IO.File
class.Edit: Posted the repro on Bugzilla. If the control is invisible due to its container being invisible, it crashes hard. Thing is that I really want that controller to be invisible...
The problem is that spending a lot of time on the repro might not make much sense when the StackTrace tells a lot, and the control has been in development outside of GitHub for months. I don't think anybody is going to try this out on the outdated sources.
I'm also not convinced we developers screwed up there. This just started crashing after the XF forms upgrade from pre2 to pre3, without any other changes. My Carousel just takes the screen once it's rendered, and I assume the rendering pipeline changed, so that the control's width is simply 0 when the crashing code runs.
Speaking of brittle: The next line isn't exactly better, with a mod operation on the width. This just begs to crash hard
hello, I think there is a bug in the IOs implementation, when removing items from the ItemSource collection of the carousel view. The collection is not updated properly and therefore newly added items are not shown.
For example: there is a collection 'Items' which contains a few items. Adding another one and removing one will cause an error.
The issue is reported here:
https://github.com/xamarin/Xamarin.Forms.CarouselView/issues/20
and can be easily reproduced by adding the following code to James Montemagnos Monkeys Example (MonkeysPage.xaml.cs -> Handle_ItemSelected)
Can someone confirm this problem or has a workaround?
Btw. the CarouselView Controll by Alex Rainman does not produce the error.
https://github.com/alexrainman/CarouselView
@Velocity Thanks a lot for your Answer.
@DavidOrtinau Any update on when the new version will be released? It has been in prerelease form with no updates for 9 months now.
Update: I just noticed CarouselView v1 Stable listed for 2.4.0 - Est Q2 2017, hopefully that comes to pass.
@JoshuaNovak There is a PR pending to merge @AlexRainman's control into Xamarin Forms. Until this is done, the 3rd party NuGet is very actively maintained: https://github.com/alexrainman/CarouselView
Is this component development dead?
Because it's a too useful component and it's sad that the latest available version is a Beta from about a year ago!
Not dead. Looks like @alexrainman is implementing the control as the new carousel view
https://github.com/xamarin/Xamarin.Forms/pull/853
@ravero
I talked to some of them at Build and what @lpdavies said is the same as what they said. I was told that you can just go ahead and use @alexrainman 's version and then switch over when the official one is release.
I'm using 2.3.0 pre2. Getting DivideByZeroException when a layout containing the CarouselView has it's visibility set to 'false' (trying to display an activity indicator whilst the images are loading).
Don't screw with the actual elements like that.
Grab Nuget package rg.plugins.popups, then you can put a "Busy" or "Loading" popup on screen while the loading takes place.
Much easier than micromanaging all the controls... And you can use that as a cover for the whole screen so the user can't tap other buttons while loading is taking place, and so on. That saves you from having to deal with 20 other issues that can creep in.
It is a wonderful user experience.
On UWP desktop, have you noticed that when you move mouse cursor outside of the carouselview, it makes a little flicker of the content ? (only the first time)
Thanks for this. It still wasn't 100% when testing on various android devices so tweaked it as shown here:
`
`
How to Disable Gestures (swipe l/r) of Carousel View on button click event? I want to disable swipe gestures for drawing purpose in canvas.
You'll need to intercept the touch event in the renderer. How you do it depends on the platform.
Is't stable?
In my opinion, this thread needs to be closed since XF is outsourcing CarouselView. We should see a new thread for that control instead.
Here's how I was able to achieve it.
https://forums.xamarin.com/discussion/comment/215322#Comment_215322
This is the wrong thread for that sorry.
I agreed with you above.







รับทำเว็บไซต์
I apologize for that but honestly there really isn't a right thread for that and I just need general advice from anyone who uses Xamarin.
Hi!
How to create Carousel/ Coverflow in Xamarin.forms
Thanks.
My app was crashed when update to XF 2.4. I have a List Itemsource Binding from Viewmodel. The item in list is a result await method. The itemsource was null when init ultil a await method return result.
My carousleview return error
JNI DETECTED ERROR IN APPLICATION: JNI Throw called with pending exception java.lang.IllegalArgumentException: itemView may not be null
10-03 06:11:30.967 F/art ( 7031): art/runtime/java_vm_ext.cc:470] (Throwable with no stack trace)
10-03 06:11:30.967 F/art ( 7031): art/runtime/java_vm_ext.cc:470] in call to Throw
10-03 06:11:30.967 F/art ( 7031): art/runtime/java_vm_ext.cc:470] from android.support.v7.widget.RecyclerView$ViewHolder md56987f6cc1cad2bad7d1513f02edd2700.ItemViewAdapter.n_onCreateViewHolder(android.view.ViewGroup, int)