xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

Frame is missing elevation and shadow inside ListView #4374

Open Reveon opened 6 years ago

Reveon commented 6 years ago

Description

Frame shadow and elevation looks different when upgrade from 3.2 to 3.3 or 3.4 pre when used inside ListView. It looks more flat and very similar to #3532. Tested the issue on Android emulator 8.0 and also on device HTC U11 with Android 8.0

Steps to Reproduce

  1. Create Xamarin.Forms project (Blank, .NET Standard, Android)
  2. Use Xaml: ` <Frame Padding="1" HasShadow="True">

Expected Behavior

Frame has visible shadow and elevation

Actual Behavior

Frame looks flat and does not have a shadow when placed inside ListView

Basic Information

Screenshots

All fine on 3.2 obrazek

Elevation and shadow missing inside ListView on 3.3+ obrazek

kingces95 commented 6 years ago

Verified as reported. image App43.zip

bentmar commented 5 years ago

I see the same no shadow effect when inside a scrollview. only on pre Oreo devices

bentmar commented 5 years ago

not excited to see that one of the most used ui elements have such low priority...

Reveon commented 5 years ago

agree :/ I tested it on 3.5 and the issue is still there

longlostbro commented 5 years ago

even tested this workaround to no avail on 3.5 https://alexdunn.org/2018/06/06/xamarin-tip-dynamic-elevation-frames/

jeromemanzano commented 5 years ago

adding a margin on the frame seems to have fixed this issue. The scrollview is probably clipping the shadow area.

longlostbro commented 5 years ago

adding a margin on the frame seems to have fixed this issue. The scrollview is probably clipping the shadow area.

I can confirm this fixed it for me as well. I applied a margin of 5 just to test. Thanks @jeromemanzano

bentmar commented 5 years ago

On android using the Visual="Material" on frames fixes all my issues. So a look on that renderer might help fixing this problem. If youre app wants to support kitkat MaterialREnderers are not available though.

johnclarete commented 5 years ago

Still getting this issue on the latest version of XF 4.1. on Android. I tried setting the Visual property of the frame to Material no luck as well as a couple of the workarounds here with setting the background. Anybody else had any luck with a workaround for this issue.

NiranjanShirke commented 4 years ago

I got issue on frame inside Listview , frame shows shadow initially but when i scrolls up or down then the item which was scrolled out from screen and again came back lost shadow .

gitkrm commented 4 years ago

don't subscribe, I'm getting over 100 emails a day from this subscription