Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListView with Checkbox in ItemTemplate results in empty rows #21639

Open
AlleSchonWeg opened this issue Apr 4, 2024 · 2 comments
Open

ListView with Checkbox in ItemTemplate results in empty rows #21639

AlleSchonWeg opened this issue Apr 4, 2024 · 2 comments
Labels
area-controls-listview ListView and TableView migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@AlleSchonWeg
Copy link
Contributor

AlleSchonWeg commented Apr 4, 2024

Description

In a ListView, which has ckeckboxes the items disappears while scrolling. (Version: 8.0.20-nightly.10426)
image

In the output you see a lot of errors:

[ResourcesCompat] Failed to inflate ColorStateList, leaving it to the framework
[ResourcesCompat] java.lang.UnsupportedOperationException: Failed to resolve attribute at index 0: TypedValue{t=0x2/d=0x7f03010f a=-1}, theme={InheritanceMap=[id=0x7f100137com.companyname.mauiapp6:style/Maui.MainTheme.NoActionBar, id=0x7f100136com.companyname.mauiapp6:style/Maui.MainTheme, id=0x7f100249com.companyname.mauiapp6:style/Theme.MaterialComponents.DayNight, id=0x7f100262com.companyname.mauiapp6:style/Theme.MaterialComponents.Light, id=0x7f10006bcom.companyname.mauiapp6:style/Base.Theme.MaterialComponents.Light, id=0x7f1000a4com.companyname.mauiapp6:style/Base.V21.Theme.MaterialComponents.Light, id=0x7f100092com.companyname.mauiapp6:style/Base.V14.Theme.MaterialComponents.Light, id=0x7f100093com.companyname.mauiapp6:style/Base.V14.Theme.MaterialComponents.Light.Bridge, id=0x7f100140com.companyname.mauiapp6:style/Platform.MaterialComponents.Light, id=0x7f10021ccom.companyname.mauiapp6:style/Theme.AppCompat.Light, id=0x7f100053com.companyname.mauiapp6:style/Base.Theme.AppCompat.Light, id=0x7f1000b6com.companyname.mauiapp6:style/Base.V28.Theme.AppCompat.Light, id=0x7f1000b3com.companyname.mauiapp6:style/Base.V26.Theme.AppCompat.Light, id=0x7f1000adcom.companyname.mauiapp6:style/Base.V23.Theme.AppCompat.Light, id=0x7f1000abcom.companyname.mauiapp6:style/Base.V22.Theme.AppCompat.Light, id=0x7f1000a0com.companyname.mauiapp6:style/Base.V21.Theme.AppCompat.Light, id=0x7f1000b9com.companyname.mauiapp6:style/Base.V7.Theme.AppCompat.Light, id=0x7f10013dcom.companyname.mauiapp6:style/Platform.AppCompat.Light, id=0x7f100148com.companyname.mauiapp6:style/Platform.V25.AppCompat.Light, id=0x1030241android:style/Theme.Material.Light.NoActionBar, id=0x1030237android:style/Theme.Material.Light, id=0x103000candroid:style/Theme.Light, id=0x1030005android:style/Theme], Themes=[com.companyname.mauiapp6:style/Maui.MainTheme.NoActionBar, forced, com.companyname.mauiapp6:style/Maui.SplashTheme, forced, com.companyname.mauiapp6:style/Theme.AppCompat.Empty, forced, android:style/Theme.DeviceDefault.Light.DarkActionBar, forced]}
[ResourcesCompat] at android.content.res.TypedArray.getColor(TypedArray.java:529)
[ResourcesCompat] at androidx.core.content.res.ColorStateListInflaterCompat.inflate(ColorStateListInflaterCompat.java:160)
[ResourcesCompat] at androidx.core.content.res.ColorStateListInflaterCompat.createFromXmlInner(ColorStateListInflaterCompat.java:125)
[ResourcesCompat] at androidx.core.content.res.ColorStateListInflaterCompat.createFromXml(ColorStateListInflaterCompat.java:104)
[ResourcesCompat] at androidx.core.content.res.ResourcesCompat.inflateColorStateList(ResourcesCompat.java:262)
[ResourcesCompat] at androidx.core.content.res.ResourcesCompat.getColorStateList(ResourcesCompat.java:236)
[ResourcesCompat] at androidx.core.content.ContextCompat.getColorStateList(ContextCompat.java:558)
[ResourcesCompat] at androidx.appcompat.content.res.AppCompatResources.getColorStateList(AppCompatResources.java:48)
[ResourcesCompat] at androidx.appcompat.widget.TintTypedArray.getColorStateList(TintTypedArray.java:179)
[ResourcesCompat] at androidx.appcompat.widget.AppCompatCompoundButtonHelper.loadFromAttributes(AppCompatCompoundButtonHelper.java:81)
[ResourcesCompat] at androidx.appcompat.widget.AppCompatCheckBox.(AppCompatCheckBox.java:84)
[ResourcesCompat] at com.google.android.material.checkbox.MaterialCheckBox.(MaterialCheckBox.java:231)
[ResourcesCompat] at com.google.android.material.checkbox.MaterialCheckBox.(MaterialCheckBox.java:227)
[ResourcesCompat] at com.google.android.material.checkbox.MaterialCheckBox.(MaterialCheckBox.java:223)
[ResourcesCompat] at crc64e1fb321c08285b90.ListViewAdapter.n_getView(Native Method)
[ResourcesCompat] at crc64e1fb321c08285b90.ListViewAdapter.getView(ListViewAdapter.java:102)
[ResourcesCompat] at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:224)
[ResourcesCompat] at android.widget.AbsListView.obtainView(AbsListView.java:2458)
[ResourcesCompat] at android.widget.ListView.makeAndAddView(ListView.java:2067)
[ResourcesCompat] at android.widget.ListView.fillDown(ListView.java:793)
[ResourcesCompat] at android.widget.ListView.fillFromTop(ListView.java:855)
[ResourcesCompat] at android.widget.ListView.layoutChildren(ListView.java:1838)
[ResourcesCompat] at android.widget.AbsListView.onLayout(AbsListView.java:2255)
[ResourcesCompat] at android.view.View.layout(View.java:23693)
[ResourcesCompat] at android.view.ViewGroup.layout(ViewGroup.java:6413)
[ResourcesCompat] at androidx.swiperefreshlayout.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:689)
[ResourcesCompat] at android.view.View.layout(View.java:23693)
[ResourcesCompat] at android.view.ViewGroup.layout(ViewGroup.java:6413)
[ResourcesCompat] at crc64e1fb321c08285b90.ListViewRenderer.n_onLayout(Native Method)
[ResourcesCompat] at crc64e1fb321c08285b90.ListViewRenderer.onLayout(ListViewRenderer.java:75)
[ResourcesCompat] at android.view.View.layout(View.java:23693)
[ResourcesCompat] at android.view.ViewGroup.layout(ViewGroup.java:6413)
[ResourcesCompat] at crc6452ffdc5b34af3a0f.ContentViewGroup.n_onLayout(Native Method)
[ResourcesCompat] at crc6452ffdc5b34af3a0f.ContentViewGroup.onLayout(ContentViewGroup.java:67)
[ResourcesCompat] at android.view.View.layout(View.java:23693)
[ResourcesCompat] at android.view.ViewGroup.layout(ViewGroup.java:6413)
[ResourcesCompat] at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
[ResourcesCompat] at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
[ResourcesCompat] at android.view.View.layout(View.java:23693)
[ResourcesCompat] at android.view.ViewGroup.layout(ViewGroup.java:6413)
[ResourcesCompat] at com.google.android.material.appbar.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:149)
[ResourcesCompat] at com.google.android.material.appbar.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:43)
[ResourcesCompat] at com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:2376)
[ResourcesCompat] at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:953)
[ResourcesCompat] at android.view.View.layout(View.java:23693)
[ResourcesCompat] at android.view.ViewGroup.layout(ViewGroup.java:6413)
[ResourcesCompat] at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
[ResourcesCompat] at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
[ResourcesCompat] at android.view.View.layout(View.java:23693)
[ResourcesCompat] at android.view.ViewGroup.layout(ViewGroup.java:6413)
[ResourcesCompat] at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
[ResourcesCompat] at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
[ResourcesCompat] at android.view.View.layout(View.java:23693)
[ResourcesCompat] at android.view.ViewGroup.layout(ViewGroup.java:6413)
[ResourcesCompat] at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
[ResourcesCompat] at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
[ResourcesCompat] at android.view.View.layout(View.java:23693)
[ResourcesCompat] at android.view.ViewGroup.layout(ViewGroup.java:6413)
[ResourcesCompat] at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
[ResourcesCompat] at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
[ResourcesCompat] at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
[ResourcesCompat] at android.view.View.layout(View.java:23693)
[ResourcesCompat] at android.view.ViewGroup.layout(ViewGroup.java:6413)
[ResourcesCompat] at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
[ResourcesCompat] at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
[ResourcesCompat] at com.android.internal.policy.DecorView.onLayout(DecorView.java:799)
[ResourcesCompat] at android.view.View.layout(View.java:23693)
[ResourcesCompat] at android.view.ViewGroup.layout(ViewGroup.java:6413)
[ResourcesCompat] at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3999)
[ResourcesCompat] at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3372)
[ResourcesCompat] at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2328)
[ResourcesCompat] at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9087)
[ResourcesCompat] at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1231)
[ResourcesCompat] at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
[ResourcesCompat] at android.view.Choreographer.doCallbacks(Choreographer.java:899)
[ResourcesCompat] at android.view.Choreographer.doFrame(Choreographer.java:832)
[ResourcesCompat] at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
[ResourcesCompat] at android.os.Handler.handleCallback(Handler.java:942)
[ResourcesCompat] at android.os.Handler.dispatchMessage(Handler.java:99)
[ResourcesCompat] at android.os.Looper.loopOnce(Looper.java:201)
[ResourcesCompat] at android.os.Looper.loop(Looper.java:288)
[ResourcesCompat] at android.app.ActivityThread.main(ActivityThread.java:7872)
[ResourcesCompat] at java.lang.reflect.Method.invoke(Native Method)
[ResourcesCompat] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
[ResourcesCompat] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Steps to Reproduce

Open sample App and scroll. Watch output window.
MauiApp6.zip

I tested only Android

Link to public reproduction project repository

No response

Version with bug

Still happens:
-> 8.0.90-ci.net8.24420.2 (Tested 26.08.2024)

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@AlleSchonWeg AlleSchonWeg added the t/bug Something isn't working label Apr 4, 2024
@kevinxufei
Copy link

Can repro this issue at Android platform on the latest 17.10 preview 2(8.0.40-nightly.10450+sha.0c02e4b345-azdo.9375189 & 8.0.3) with sample project.

@kevinxufei kevinxufei added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed potential-regression This issue described a possible regression on a currently supported version., verification pending labels Apr 7, 2024
@PureWeen PureWeen removed the potential-regression This issue described a possible regression on a currently supported version., verification pending label Apr 9, 2024
@PureWeen PureWeen added this to the Backlog milestone Apr 9, 2024
@samhouts samhouts added the migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert label Apr 22, 2024
@hbraasch
Copy link

I also experience this problem.

@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-listview ListView and TableView migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants