A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
Android.Widget.ListView error in MAUI
vanKraster
201
Reputation points
Hi to all,
I am trying to render a Android.Widget.ListView in Android with MAUI and it is not working.
The error is : removeAllViews() is not supported in AdapterView
Same code in Xamarin Forms is working, Custom renderer of android
protected override void OnElementChanged(ElementChangedEventArgs<DTWheelPicker> e)
{
base.OnElementChanged(e);
if (e.NewElement == null)
{
return;
}
if (e.NewElement != null)
{
var inflater = (global::Android.Views.LayoutInflater)this.Context.GetSystemService(global::Android.App.Service.LayoutInflaterService);
var layout = inflater.Inflate(Resource.Layout.wheelPicker, null).JavaCast<Android.Widget.ListView>();
SetAdapter();
SetNativeControl(layout);
}
}
Developer technologies | .NET | .NET Multi-platform App UI
Developer technologies | .NET | .NET Multi-platform App UI
Sign in to answer