Closed KieronQuinn closed 3 years ago
Exactly my problem. Looks like no fix yet for it. Did you find a workaround for this? maybe Some thread.sleep or?
@rookiejava you know if we can find a solution for this? :) just tagging in case if you have missed it thanks
Exactly my problem. Looks like no fix yet for it. Did you find a workaround for this? maybe Some thread.sleep or?
Nope. I actually abandoned my whole Tizen project entirely and intend to switch to the new WearOS powered watch in the next couple of weeks. Tizen turned out to just be too buggy and annoying to develop on.
Too bad Tizen has such potential i am doing WearOS also and i find I can complete a task with Tizen even faster as it supports XF but it has too less support unfortunately. One thing also good existing TIzen apps are working on Samsung Watch 4 now.
Regarding the error, I tried to override OnScrollAnimationStopped with some null controls but somehow it doesnt help and below exception is still fired. I am guessing that it occurs within the Core or somewhere else.
public class MyCustomListViewRenderer : CircleListViewRenderer
{
new MyCustomListView Element => base.Element as MyCustomListView;
protected override void OnElementReady()
{
base.OnElementReady();
Control.ScrollAnimationStopped += OnScrollAnimationStopped;
}
private void OnScrollAnimationStopped(object sender, EventArgs arrgs)
{
if (Control == null || Element == null)
return;
GenListItem item = Control.GetItemByPosition(180, 180, out int pos);
if (item == null)
return;
if (item.Data is NListView.ItemContext itemContext && itemContext != null && pos == 0)
{
var obj = itemContext.Cell?.BindingContext;
if (obj != null)
{
var index = Element.TemplatedItems.GetGlobalIndexOfItem(obj);
Log.Debug("TEST", $"Item index: {index}");
Element.NotifyHighlightedItem(obj, index);
}
}
}
protected override void Dispose(bool disposing)
{
if (disposing && Control != null)
{
Control.ScrollAnimationStopped -= OnScrollAnimationStopped;
}
base.Dispose(disposing);
}
}
System.NullReferenceException: Object reference not set to an instance of an object.
at Tizen.Wearable.CircularUI.Forms.Renderer.CircleListViewRenderer.OnScrollAnimationStopped(Object sender, EventArgs args)
at ElmSharp.SmartEvent.SendEvent(Object sender, EventArgs e)
at ElmSharp.SmartEvent`1.<>c__DisplayClass12_0.<add_On>b__0(IntPtr d, IntPtr o, IntPtr e)
at Tizen.Applications.CoreBackend.UICoreBackend.Run(String[] args) at Tizen.Applications.CoreApplication.Run(String[] args)
at Tizen.Applications.CoreUIApplication.Run(String[] args)
at myWorkoutAccessoryC.Program.Main(String[] args) Fatal error.
One thing also good existing TIzen apps are working on Samsung Watch 4 now.
I don't think this is the case, WearOS doesn't run Tizen apps. We're actually seeing companies port the apps, they're not using the same code.
I am not sure in general wearos but when you create a new tizen app and want to publish via Samsung developer Portal, there is option to publish for watch 4 and active 4 as well. So I mean samsung watch 4 with wearos is able to run tizen apps.
Nope. I actually abandoned my whole Tizen project entirely and intend to switch to the new WearOS powered watch in the next couple of weeks. Tizen turned out to just be too buggy and annoying to develop on.
My Bad. I'm sorry to check this issue too late. We will check and get back as soon as possible. (/cc @shyunMin @sung-su @JoonghyunCho )
you know if we can find a solution for this? :) just tagging in case if you have missed it thanks
Thank you for reminding me. :-)
Hello @KieronQuinn, sorry again for the late answer. We tested a scenario like you said with CarouselView, ScrollView and CircleListView, and the issue is not reproduced on an emulator, unfortunately. We will test it on the target product as soon as we get to find one.
I vaguely recall that it might have worked in the emulator but not on device, but I was unable to get an internet connection to work on the emulator so it was hard to test.
Hello @KieronQuinn, I've checked the issue and pushed the patch to fix it. I'll let you know as soon as a new package applied the change is published. Thanks for reporting the issue.
Just in case you missed. Fixed package has been released! Thanks. https://github.com/Samsung/Tizen.CircularUI/releases/tag/release-1.5.4
Describe the bug When using one (or more) CircleListView within a CarouselView, if the user swipes away from the focused CircleListview while the animation is still running (ie. they scroll by swipe or rotary action then swipe away), the app will hard crash with a NullReferenceException.
To Reproduce Steps to reproduce the behavior:
Expected behavior The page should be swiped away without issue
Screenshots First page (scrollview) Second page (circlelistview)
Environment (please complete the following information):