enisn / UraniumUI

Uranium is a Free & Open-Source UI Kit for MAUI.
Apache License 2.0
1.19k stars 142 forks source link

Inputfield animation fix #755

Closed enisn closed 2 months ago

enisn commented 2 months ago

Resolves https://github.com/enisn/UraniumUI/issues/738

Before

357033013-157a5092-04ed-4958-b7b8-3fc089f05347

After

inputfield-animation-fix

ketakidevendra commented 2 months ago

@enisn - I took prerelease version - 2.10.0-pre.2 to test #738 I got exception on page load. Below is the stack trace. System.NullReferenceException: Object reference not set to an instance of an object at UraniumUI.Material.Controls.InputField.OnIconChanged() at UraniumUI.Material.Controls.TimePickerField.OnIconChanged() at UraniumUI.Material.Controls.InputField.<>c.<.cctor>b114_2(BindableObject bindable, Object oldValue, Object newValue) at Microsoft.Maui.Controls.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity, Boolean silent) at Microsoft.Maui.Controls.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes, SetterSpecificity specificity) at Microsoft.Maui.Controls.BindableObject.SetValue(BindableProperty property, Object value, SetterSpecificity specificity) at Microsoft.Maui.Controls.Setter.Apply(BindableObject target, SetterSpecificity specificity) at Microsoft.Maui.Controls.Style.ApplyCore(BindableObject bindable, Style basedOn, SetterSpecificity specificity) at Microsoft.Maui.Controls.Style.Microsoft.Maui.Controls.IStyle.Apply(BindableObject bindable, SetterSpecificity specificity) at Microsoft.Maui.Controls.MergedStyle.SetStyle(IStyle implicitStyle, IList`1 classStyles, IStyle style) at Microsoft.Maui.Controls.MergedStyle.set_ImplicitStyle(IStyle value) at Microsoft.Maui.Controls.MergedStyle.OnImplicitStyleChanged() at Microsoft.Maui.Controls.MergedStyle.b31_0(BindableObject bindable, Object oldvalue, Object newvalue) at Microsoft.Maui.Controls.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity, Boolean silent) at Microsoft.Maui.Controls.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes, SetterSpecificity specificity) at Microsoft.Maui.Controls.Element.OnResourceChanged(BindableProperty property, Object value, SetterSpecificity specificity) at Microsoft.Maui.Controls.Element.OnSetDynamicResource(BindableProperty property, String key, SetterSpecificity specificity) at Microsoft.Maui.Controls.BindableObject.SetDynamicResource(BindableProperty property, String key, SetterSpecificity specificity) at Microsoft.Maui.Controls.BindableObject.SetDynamicResource(BindableProperty property, String key) at Microsoft.Maui.Controls.MergedStyle.RegisterImplicitStyles() at Microsoft.Maui.Controls.MergedStyle..ctor(Type targetType, BindableObject target) at Microsoft.Maui.Controls.NavigableElement..ctor() at Microsoft.Maui.Controls.VisualElement..ctor() at Microsoft.Maui.Controls.View..ctor() at Microsoft.Maui.Controls.Compatibility.Layout..ctor() at Microsoft.Maui.Controls.TemplatedView..ctor() at Microsoft.Maui.Controls.ContentView..ctor() at UraniumUI.Material.Controls.InputField..ctor() at UraniumUI.Material.Controls.TimePickerField..ctor() at LastradaApp.Views.SyncSettingsPage.InitializeComponent() at LastradaApp.Views.SyncSettingsPage..ctor(SyncSettingsViewModel viewmodel) at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Constructor(Object obj, IntPtr* args) at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object , Span1 , BindingFlags ) at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object , BindingFlags , Binder , Object[] , CultureInfo ) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags , Binder , Object[] , CultureInfo ) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite , RuntimeResolverContext ) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].VisitCallSiteMain(ServiceCallSite , RuntimeResolverContext ) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite , RuntimeResolverContext ) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext, Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].VisitCallSite(ServiceCallSite callSite, RuntimeResolverContext argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite , ServiceProviderEngineScope ) at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier) at System.Collections.Concurrent.ConcurrentDictionary2[[Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceIdentifier, Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60],[Microsoft.Extensions.DependencyInjection.ServiceProvider.ServiceAccessor, Microsoft.Extensions.DependencyInjection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].GetOrAdd(ServiceIdentifier , Func`2 ) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier , ServiceProviderEngineScope ) at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type ) at Microsoft.Maui.MauiContext.WrappedServiceProvider.GetService(Type serviceType) at Microsoft.Maui.Controls.ShellContent.<>cDisplayClass19_0.b__0() at Microsoft.Maui.Controls.ElementTemplate.CreateContent() at Microsoft.Maui.Controls.Internals.DataTemplateExtensions.CreateContent(DataTemplate self, Object item, BindableObject container) at Microsoft.Maui.Controls.ShellContent.Microsoft.Maui.Controls.IShellContentController.GetOrCreateContent() at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) at AndroidX.Fragment.App.Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_osBundle(IntPtr jnienv, IntPtr nativethis, IntPtr native_inflater, IntPtr native_container, IntPtr native_savedInstanceState) at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPLLL_L(_JniMarshal_PPLLL_L callback, IntPtr jnienv, IntPtr klazz, IntPtr p0, IntPtr p1, IntPtr p2)

enisn commented 2 months ago

Can you try with a clean build via cleaning bin and obj folders than open VS or whatever you use. Build application and run.

I can't reproduce in the latest preview version the same exception. textfield-tabview-test

If you still face the problem, can you provide me a sample that reproduces the problem?

ketakidevendra commented 2 months ago

@enisn - This issue is fixed. You can close it. There was problem in my project.