maui icon indicating copy to clipboard operation
maui copied to clipboard

ViewCell Disappears when unfocused

Open BinaryAssault opened this issue 2 years ago • 21 comments

Description

It seems that when you use a ViewCell in any TableView, it will disappear. The disappear seems to occur when something new focuses.

A few examples:

BrokenViewCells-EntryCellFocusBrokenViewCells-PickerNoStackLayout BrokenViewCells-PickerInStackLayoutBrokenViewCells-RadioButtons

Steps to Reproduce

  1. Create a new MAUI .NET App
  2. Add the following to the MainPAge XAML
<Grid>
    <TableView>
        <TableRoot>
            <TableSection Title="Broken ViewCells Section">

                <EntryCell Text="Click me to break a ViewCell!" />

                <ViewCell>
                    <StackLayout BackgroundColor="PaleGreen">
                        
                        <Label Text="Select something" />
                        
                        <Picker>
                            <Picker.Items>
                                <x:String>Item1</x:String>
                                <x:String>Item2</x:String>
                                <x:String>Item3</x:String>
                                <x:String>Item4</x:String>
                            </Picker.Items>
                        </Picker>
                        
                    </StackLayout>
                </ViewCell>

                <ViewCell>
                    <Picker BackgroundColor="PaleVioletRed">
                        <Picker.Items>
                            <x:String>ItemA</x:String>
                            <x:String>ItemB</x:String>
                            <x:String>ItemC</x:String>
                            <x:String>ItemD</x:String>
                        </Picker.Items>
                    </Picker>
                </ViewCell>

                <ViewCell>
                    
                    <StackLayout BackgroundColor="PaleTurquoise" Orientation="Horizontal">
                       
                        <RadioButton Content="Option 1" />
                        <RadioButton Content="Option 2" />
                        <RadioButton Content="Option 3" />
                        
                    </StackLayout>
                </ViewCell>

                <SwitchCell Text="I can also break a ViewCell!" />
                
            </TableSection>
        </TableRoot>
    </TableView>
</Grid>
  1. Run the app
  2. Click either a Picker or a radio button
  3. Click into a entry or select a switch
  4. Notice the issue

Version with bug

Preview 13 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 10

Did you find any workaround?

No

Relevant log output

> am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.companyname.mauiapp_bugs/crc64b666f3464586d4c2.MainActivity"
> Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.companyname.mauiapp_bugs/crc64b666f3464586d4c2.MainActivity }
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/MauiApp_Bugs.dll
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Mono.Android.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Runtime.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Java.Interop.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Collections.dll [External]
Resolved pending breakpoint for 'Android.Runtime.JNIEnv.RegisterJniNatives(System.IntPtr, System.Int32, System.IntPtr, System.IntPtr, System.Int32)' to /Users/builder/azdo/_work/2/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnv.cs:124 [0x00000].
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Threading.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Runtime.InteropServices.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Threading.Thread.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Diagnostics.StackTrace.dll [External]
Loaded assembly: data-0xc6297600 [External]
Loaded assembly: data-0xc5e72b00 [External]
Loaded assembly: data-0xc5e7db80 [External]
Loaded assembly: data-0xc5edfe40 [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/netstandard.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Linq.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Collections.Concurrent.dll [External]
Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointSendToIde(System.String)' to D:\a\_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:415 [0x00000].
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Text.Json.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Text.Encodings.Web.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.ComponentModel.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Maui.Controls.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.ObjectModel.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Maui.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Maui.Graphics.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Extensions.Logging.Abstractions.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Runtime.Loader.dll [External]
Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointCheckpoint()' to D:\a\_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:410 [0x00000].
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Reflection.Emit.Lightweight.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Reflection.Emit.ILGeneration.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Reflection.Primitives.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Maui.Essentials.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.Core.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Extensions.DependencyInjection.Abstractions.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Maui.Controls.Compatibility.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Extensions.Configuration.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Extensions.Configuration.Abstractions.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Extensions.Logging.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Extensions.Primitives.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Maui.Controls.Xaml.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.AppCompat.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.Google.Android.Material.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.ComponentModel.TypeConverter.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Private.Uri.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.DrawerLayout.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.CustomView.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.Navigation.Runtime.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Extensions.DependencyInjection.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Diagnostics.Tracing.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Extensions.Options.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Linq.Expressions.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Xml.ReaderWriter.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Private.Xml.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Text.Encoding.Extensions.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Memory.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Text.RegularExpressions.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Runtime.CompilerServices.Unsafe.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Numerics.Vectors.dll [External]
Thread started:  #2
Thread started:  #3
Thread started:  #4
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Runtime.Serialization.Json.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Private.DataContractSerialization.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Runtime.Serialization.Xml.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Runtime.Serialization.Primitives.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/mscorlib.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.SwipeRefreshLayout.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.CardView.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Microsoft.Maui.Controls.Compatibility.Android.FormsViewGroup.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.RecyclerView.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.ViewPager.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.Fragment.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.Activity.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.Lifecycle.ViewModel.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.Lifecycle.Common.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.SavedState.dll [External]
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.ViewPager2.dll [External]
[me.mauiapp_bug] Late-enabling -Xcheck:jni
[me.mauiapp_bug] Unknown bits set in runtime_flags: 0x8000
[me.mauiapp_bug] Unexpected CPU variant for X86 using defaults: x86
[debug-app-helper] Checking if libmonodroid was unpacked to /data/app/com.companyname.mauiapp_bugs-Ld8wpcdx32W3HhxCAZvJfg==/lib/x86/libmonodroid.so
[debug-app-helper] Native libs extracted to /data/app/com.companyname.mauiapp_bugs-Ld8wpcdx32W3HhxCAZvJfg==/lib/x86, assuming application/android:extractNativeLibs == true
[debug-app-helper] Setting up for DSO lookup in app data directories
[debug-app-helper] Added filesystem DSO lookup location: /data/app/com.companyname.mauiapp_bugs-Ld8wpcdx32W3HhxCAZvJfg==/lib/x86
[debug-app-helper] Using runtime path: /data/app/com.companyname.mauiapp_bugs-Ld8wpcdx32W3HhxCAZvJfg==/lib/x86
[debug-app-helper] checking directory: `/data/user/0/com.companyname.mauiapp_bugs/files/.__override__/lib`
[debug-app-helper] directory does not exist: `/data/user/0/com.companyname.mauiapp_bugs/files/.__override__/lib`
[debug-app-helper] Checking whether Mono runtime exists at: /data/user/0/com.companyname.mauiapp_bugs/files/.__override__/libmonosgen-2.0.so
[debug-app-helper] Checking whether Mono runtime exists at: /data/app/com.companyname.mauiapp_bugs-Ld8wpcdx32W3HhxCAZvJfg==/lib/x86/libmonosgen-2.0.so
[debug-app-helper] Mono runtime found at: /data/app/com.companyname.mauiapp_bugs-Ld8wpcdx32W3HhxCAZvJfg==/lib/x86/libmonosgen-2.0.so
[me.mauiapp_bug] Attempt to remove non-JNI local reference, dumping thread
[DOTNET] JNI_OnLoad: JNI_OnLoad in pal_jni.c
[monodroid] Creating public update directory: `/data/user/0/com.companyname.mauiapp_bugs/files/.__override__`
[me.mauiapp_bug] Attempt to remove non-JNI local reference, dumping thread
[monodroid-debug] Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=10.0.2.2:56870,embedding=1
[monodroid-assembly] open_from_bundles: failed to load assembly MauiApp_Bugs.dll
[monodroid-gc] GREF GC Threshold: 46080
[monodroid-assembly] open_from_bundles: failed to load assembly Mono.Android.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Java.Interop.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Collections.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Threading.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.InteropServices.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Threading.Thread.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Diagnostics.StackTrace.dll
[me.mauiapp_bug] Attempt to remove non-JNI local reference, dumping thread
[monodroid-assembly] open_from_bundles: failed to load assembly netstandard.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Linq.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.HotReload.Contracts.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.HotReload.Contracts.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Collections.Concurrent.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Text.Json.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Text.Encodings.Web.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.ComponentModel.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Controls.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.HotReload.Contracts.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.HotReload.Contracts.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.VisualStudio.DesignTools.TapContract.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.ObjectModel.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Graphics.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Logging.Abstractions.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Loader.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Reflection.Emit.Lightweight.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Reflection.Emit.ILGeneration.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Reflection.Primitives.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Essentials.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Core.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.DependencyInjection.Abstractions.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Controls.Compatibility.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Configuration.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Configuration.Abstractions.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Logging.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Primitives.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Controls.Xaml.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.AppCompat.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.Google.Android.Material.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.ComponentModel.TypeConverter.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Private.Uri.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.DrawerLayout.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.CustomView.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Navigation.Runtime.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.DependencyInjection.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Diagnostics.Tracing.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Extensions.Options.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Linq.Expressions.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Xml.ReaderWriter.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Private.Xml.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Text.Encoding.Extensions.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Memory.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Text.RegularExpressions.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.CompilerServices.Unsafe.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Numerics.Vectors.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Serialization.Json.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Private.DataContractSerialization.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Serialization.Xml.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Serialization.Primitives.dll
[monodroid-assembly] open_from_bundles: failed to load assembly mscorlib.dll
[monodroid-assembly] open_from_bundles: failed to load assembly System.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.SwipeRefreshLayout.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.CardView.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Microsoft.Maui.Controls.Compatibility.Android.FormsViewGroup.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.RecyclerView.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.ViewPager.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Fragment.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Activity.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Lifecycle.ViewModel.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Lifecycle.Common.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.SavedState.dll
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.ViewPager2.dll
[libEGL] Emulator has host GPU support, qemu.gles is set to 1.
[libc] Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied)
[RenderThread] type=1400 audit(0.0:5739): avc: denied { write } for name="property_service" dev="tmpfs" ino=8412 scontext=u:r:untrusted_app:s0:c148,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 app=com.companyname.mauiapp_bugs
[libEGL] loaded /vendor/lib/egl/libEGL_emulation.so
[libEGL] loaded /vendor/lib/egl/libGLESv1_CM_emulation.so
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Loader.dll
[libEGL] loaded /vendor/lib/egl/libGLESv2_emulation.so
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.Loader.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.CoordinatorLayout.dll
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.CoordinatorLayout.dll [External]
[monodroid-assembly] open_from_bundles: failed to load assembly Xamarin.AndroidX.Lifecycle.LiveData.Core.dll
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/Xamarin.AndroidX.Lifecycle.LiveData.Core.dll [External]
[me.mauiapp_bug] Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
[me.mauiapp_bug] Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
Thread started: .NET Timers #5
[me.mauiapp_bug] JIT allocated 70KB for compiled code of void android.view.View.<init>(android.content.Context, android.util.AttributeSet, int, int)
[HostConnection] HostConnection::get() New Host Connection established 0xdd94cf50, tid 26247
[HostConnection] HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2 
[EGL_emulation] eglCreateContext: 0xdd91a840: maj 2 min 0 rcv 2
[EGL_emulation] eglMakeCurrent: 0xdd91a840: ver 2 0 (tinfo 0xdd90f0f0)
[Gralloc3] mapper 3.x is not supported
[HostConnection] createUnique: call
[HostConnection] HostConnection::get() New Host Connection established 0xdd94d040, tid 26247
[HostConnection] HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_sync_buffer_data GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2 
[eglCodecCommon] allocate: Ask for block of size 0x1000
[eglCodecCommon] allocate: ioctl allocate returned offset 0x3ffff8000 size 0x2000
[EGL_emulation] eglMakeCurrent: 0xdd91a840: ver 2 0 (tinfo 0xdd90f0f0)
[OpenGLRenderer] Davey! duration=1231ms; Flags=1, IntendedVsync=32986008512045, Vsync=32986008512045, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=32986023677280, AnimationStart=32986023714380, PerformTraversalsStart=32986023742680, DrawStart=32986765292080, SyncQueued=32986778731580, SyncStart=32986779523580, IssueDrawCommandsStart=32986779618080, SwapBuffers=32987132157980, FrameCompleted=32987241152980, DequeueBufferDuration=299000, QueueBufferDuration=364000, 
[Choreographer] Skipped 73 frames!  The application may be doing too much work on its main thread.
[OpenGLRenderer] Davey! duration=1268ms; Flags=0, IntendedVsync=32986025157946, Vsync=32987241824564, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=32987246464180, AnimationStart=32987247635180, PerformTraversalsStart=32987249389480, DrawStart=32987251343980, SyncQueued=32987252159780, SyncStart=32987252612880, IssueDrawCommandsStart=32987252686780, SwapBuffers=32987264323080, FrameCompleted=32987294447080, DequeueBufferDuration=53000, QueueBufferDuration=12336000, 
Thread started: <Thread Pool> #6
Thread started: .NET ThreadPool Gate #7
Thread started: <Thread Pool> #8
[monodroid-assembly] open_from_bundles: failed to load assembly System.Runtime.Intrinsics.dll
Loaded assembly: /data/data/com.companyname.mauiapp_bugs/files/.__override__/System.Runtime.Intrinsics.dll [External]
Thread started: <Thread Pool> #9
Thread started: <Thread Pool> #10
Thread started: <Thread Pool> #11
[AssistStructure] Flattened final assist data: 3276 bytes, containing 2 windows, 22 views
[EGL_emulation] eglMakeCurrent: 0xdd91a840: ver 2 0 (tinfo 0xdd90f0f0)
[EGL_emulation] eglMakeCurrent: 0xdd91a840: ver 2 0 (tinfo 0xdd90f0f0)
[EGL_emulation] eglMakeCurrent: 0xdd91a840: ver 2 0 (tinfo 0xdd90f0f0)
[EGL_emulation] eglMakeCurrent: 0xdd91a840: ver 2 0 (tinfo 0xdd90f0f0)

BinaryAssault avatar Mar 14 '22 22:03 BinaryAssault

verified repro except the first scenario with vs 17.2.0 Preview 3.0 [32314.195.main] 5292-1

shimingsg avatar Mar 15 '22 01:03 shimingsg

@shimingsg, can you double check the xaml for the radio buttons? Curious why the background color is to the right of the group. Maybe you accidentally discovered a workaround? Also in the same scenario, does clicking the SwitchCell cause the issue to occur?

Lastly, why does your keyboard not show when clicking an entry?

BinaryAssault avatar Mar 15 '22 01:03 BinaryAssault

@BinaryAssault , I used the xaml in "Steps to Reproduce", please see the attached demo MauiApp5292.zip the scenario I did: click option 2 -> option3 -> option 1 -> entry 5292-2

shimingsg avatar Mar 15 '22 09:03 shimingsg

It seems our emulators are of different APIs. I am using A10 and you're using A11. But even using A11, if I select one of the pickers or the SwitchCell, the radio button view cell disappears.

Example below is from A11 BrokenViewCells-SwitchCellA11

BinaryAssault avatar Mar 15 '22 16:03 BinaryAssault

Related. ViewCell not only disappears when unfocused, it also fails to appear at all in some "advanced" cases. I'll reuse the code I used in this issue few weeks back. Just replace the xaml with this:

<ContentPage.Resources>
		<conv:InverseBoolConverter x:Key="inverseBool"/>
	</ContentPage.Resources>

	<ScrollView>
		<VerticalStackLayout>
			<TableView Intent="Settings" BackgroundColor="AliceBlue">
				<TableRoot>
					<TableSection>
						<ViewCell>
							<Grid ColumnDefinitions="*, *" >
								<Label Text="Use all sources:" />
								<CheckBox  Grid.Column="1" IsChecked="{Binding UseAllNames}" x:Name="AllNamesCheckBox" />
							</Grid>
						</ViewCell>
					</TableSection>
				</TableRoot>
			</TableView>
			<ListView ItemsSource="{Binding Names}">
				<ListView.ItemTemplate>
					<DataTemplate>
						<SwitchCell On="{Binding Selected}" Text="{Binding Value}" IsEnabled="{Binding On, Source={x:Reference AllNamesSwitchCell}, Converter={StaticResource  inverseBool}}"/>
					</DataTemplate>
				</ListView.ItemTemplate>
			</ListView>
			<TableView Intent="Settings" BackgroundColor="AliceBlue">
				<TableRoot>
					<TableSection>
						<ViewCell>
							<Grid ColumnDefinitions="*, *" >
								<Label Text="Use all surnames:" />
								<CheckBox  Grid.Column="1" IsChecked="{Binding UseAllSurnames}" x:Name="AllSurnamesSwitchCell" />
							</Grid>
						</ViewCell>
					</TableSection>
				</TableRoot>
			</TableView>
			<ListView ItemsSource="{Binding Surnames}">
				<ListView.ItemTemplate>
					<DataTemplate>
						<SwitchCell On="{Binding Selected}" Text="{Binding Value}" IsEnabled="{Binding On, Source={x:Reference AllSurnamesSwitchCell}, Converter={StaticResource  inverseBool}}" >
						</SwitchCell>
					</DataTemplate>
				</ListView.ItemTemplate>
			</ListView>
		</VerticalStackLayout>
	</ScrollView>

And you will see, that the ViewCell does not appear at all image

If I play around with TableSelection at runtime (Hot Reload), I can make them appear (don't mind the ugly UI) image

MissedSte4k avatar May 02 '22 14:05 MissedSte4k

This may be an async timing issue. When I was running the emulator without a hypervisor the controls in the ViewCell would briefly show up. Sometimes it would disappear, sometimes it wouldn't, it was erratic.

When I enabled the hypervisor the emulator was much more performant and I didn't have problems with the ViewCell disappearing shortly after being drawn. It could be coincidence but it would explain why this always can't be reproduced.

It only seems to be an issue with the ViewCells. The SwitchCells don't disappear (nor the EntryCells I tested).

https://user-images.githubusercontent.com/4380198/171073026-42fc082b-3214-4ee5-b768-84b94de0b067.mp4

Edit to add: And now it's back. Here is my XAML.

<Grid ColumnDefinitions="150, *" RowDefinitions="50, 200, *">
    <Label Grid.Row="0" Grid.ColumnSpan="2" Text="Cat Question" FontSize="20" VerticalTextAlignment="Center" Margin="10, 0, 0, 0" />
    <AbsoluteLayout Grid.Row="1" Grid.Column="0">
        <Image Source="images/trouble_cat.jpg" Aspect="AspectFill" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0, 0, 1, 1" />
        <Label Text="Trouble Cat" HorizontalTextAlignment="Center" FontSize="20" AbsoluteLayout.LayoutFlags="PositionProportional,WidthProportional" AbsoluteLayout.LayoutBounds="0, 1, 1, 25" />
    </AbsoluteLayout>
    <Label Grid.Row="1" Grid.Column="1" Margin="10, 0, 0, 0" VerticalTextAlignment="Center" Text="How cute do you think this cat is?" />
    <TableView Grid.Row="2" Grid.ColumnSpan="2" RowHeight="50">
        <TableRoot>
            <TableSection>
                <SwitchCell Text="Meh, I've seen cuter" />
                <SwitchCell Text="That doesn't look like a dog" />
                <ViewCell>
                    <Grid ColumnDefinitions="*, 50" RowDefinitions="50">
                        <Label Grid.Row="0" Grid.Column="0" VerticalTextAlignment="Center" Text="SuperCute!" />
                        <RadioButton Grid.Row="0" Grid.Column="1" IsChecked="True" GroupName="Answer" BackgroundColor="Transparent" />
                    </Grid>
                </ViewCell>
                <ViewCell>
                    <Grid ColumnDefinitions="*, 50" RowDefinitions="50">
                        <Label Grid.Row="0" Grid.Column="0" VerticalTextAlignment="Center" Text="I can't believe how cute this cat is" />
                        <RadioButton Grid.Row="0" Grid.Column="1" GroupName="Answer" BackgroundColor="Transparent" />
                    </Grid>
                </ViewCell>
            </TableSection>
        </TableRoot>
    </TableView>
</Grid>

Bowman74 avatar May 31 '22 01:05 Bowman74

This may be an async timing issue. When I was running the emulator without a hypervisor the controls in the ViewCell would briefly show up. Sometimes it would disappear, sometimes it wouldn't, it was erratic.

When I enabled the hypervisor the emulator was much more performant and I didn't have problems with the ViewCell disappearing shortly after being drawn. It could be coincidence but it would explain why this always can't be reproduced.

It only seems to be an issue with the ViewCells. The SwitchCells don't disappear (nor the EntryCells I tested).

ViewCell.mp4 Edit to add: And now it's back. Here is my XAML.

<Grid ColumnDefinitions="150, *" RowDefinitions="50, 200, *">
    <Label Grid.Row="0" Grid.ColumnSpan="2" Text="Cat Question" FontSize="20" VerticalTextAlignment="Center" Margin="10, 0, 0, 0" />
    <AbsoluteLayout Grid.Row="1" Grid.Column="0">
        <Image Source="images/trouble_cat.jpg" Aspect="AspectFill" AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0, 0, 1, 1" />
        <Label Text="Trouble Cat" HorizontalTextAlignment="Center" FontSize="20" AbsoluteLayout.LayoutFlags="PositionProportional,WidthProportional" AbsoluteLayout.LayoutBounds="0, 1, 1, 25" />
    </AbsoluteLayout>
    <Label Grid.Row="1" Grid.Column="1" Margin="10, 0, 0, 0" VerticalTextAlignment="Center" Text="How cute do you think this cat is?" />
    <TableView Grid.Row="2" Grid.ColumnSpan="2" RowHeight="50">
        <TableRoot>
            <TableSection>
                <SwitchCell Text="Meh, I've seen cuter" />
                <SwitchCell Text="That doesn't look like a dog" />
                <ViewCell>
                    <Grid ColumnDefinitions="*, 50" RowDefinitions="50">
                        <Label Grid.Row="0" Grid.Column="0" VerticalTextAlignment="Center" Text="SuperCute!" />
                        <RadioButton Grid.Row="0" Grid.Column="1" IsChecked="True" GroupName="Answer" BackgroundColor="Transparent" />
                    </Grid>
                </ViewCell>
                <ViewCell>
                    <Grid ColumnDefinitions="*, 50" RowDefinitions="50">
                        <Label Grid.Row="0" Grid.Column="0" VerticalTextAlignment="Center" Text="I can't believe how cute this cat is" />
                        <RadioButton Grid.Row="0" Grid.Column="1" GroupName="Answer" BackgroundColor="Transparent" />
                    </Grid>
                </ViewCell>
            </TableSection>
        </TableRoot>
    </TableView>
</Grid>

I'll have to disagree with you as this is still a failure on a physical android device for me. I tried on 3 different API levels and all did the same thing. Its a bummer that this is still a problem with GA as it really inhibits the ability to make a simple settings page. I have to either create a custom control to handle all my settings or breakout a slew custom XAML per setting to get the look of a table.

All I want is the ability to use a picker in settings, which requires a ViewCell; but I can't do that.

BinaryAssault avatar Jun 04 '22 02:06 BinaryAssault

Please can this be fixed? It is a showstopper for MAUI migration - I cannot use ViewCells on Android (which work fine in Xamarin) and as @BinaryAssault comments there is no alternative to render many controls such as picker within a table, or to, for example render a grid within a table. @Redth why is this no longer a P1? I have the impression that GA for MAUI was premature with many breaking issues unresolved and an unrealistic timetable for Xamarin support ending when migration to MAUI is not feasible.

SophisticatedConsulting avatar Jun 05 '22 07:06 SophisticatedConsulting

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

msftbot[bot] avatar Aug 30 '22 15:08 msftbot[bot]

It is really poor this is not being fixed. ViewCell does not work in maui and is a showstopper for migration. Please prioritise fixing critical maui bugs that stop migration over new features.

SophisticatedConsulting avatar Sep 03 '22 10:09 SophisticatedConsulting

Being able to use ViewCells is important when using TableViews for Settings Pages.

ewerspej avatar Sep 26 '22 14:09 ewerspej

I Was able to solve using <TableView HeightRequest="700"> or any other large number. I'm not sure how it will work on larger screens. Maybe the problem has something to do with the TableView or ViewCell Height property

ArielHashuel avatar Oct 12 '22 17:10 ArielHashuel

I Was able to solve using <TableView HeightRequest="700"> or any other large number. I'm not sure how it will work on larger screens. Maybe the problem has something to do with the TableView or ViewCell Height property

Interesting, the HeightRequest indeed does work to fight the issue. But that shouldn't be required.

On the same line, I tried setting VerticalOptions and MinimumHeightRequest and neither of those worked. I also tried a height on the ViewCell itself without any luck.

BinaryAssault avatar Oct 13 '22 22:10 BinaryAssault

Setting the HeightRequest for the entire control is not a solution, because in most scenarios, you don't know what the Height needs to be. This issue should be worked on rather soon, otherwise TableView is not a useful control. I would strongly disagree with using this "workaround" as an excuse to not fix this bug.

ewerspej avatar Oct 14 '22 09:10 ewerspej

I Was able to solve using <TableView HeightRequest="700"> or any other large number. I'm not sure how it will work on larger screens. Maybe the problem has something to do with the TableView or ViewCell Height property

Thank you, this unblocked my MAUI migration.

jahmai-ca avatar Oct 26 '22 04:10 jahmai-ca