Cardview: Weird lines appearing

Created on 20 Sep 2018  路  33Comments  路  Source: AndreiMisiukevich/CardView

ezgif com-video-to-gif 2

Hi there, noticing an issue have attached gif:

Part of code is this::

PanCardView.CarouselView cardsView = new PanCardView.CarouselView() { ItemTemplate = new DataTemplate(() => new ImageCardItemView()), ItemsSource = list, SelectedIndex = currentPhotoIndex, SlideShowDuration = 3500 };

`BackgroundColor = Settings.XeniaBlackThemeColorAlpha;

        _image = new CachedImage
        {
            Aspect = Aspect.AspectFill,
        };

        frame = new Frame()
        {
            Padding = 0,
            CornerRadius = 10,
            HasShadow = false,
            HorizontalOptions = LayoutOptions.Center,
            IsClippedToBounds = true,
            VerticalOptions = LayoutOptions.Center,
            WidthRequest = 300,
            HeightRequest = 300
        };
        _image.SetBinding(CachedImage.SourceProperty, "Source");
        frame.Content = _image;
        Content = frame;`

......

Oddly Im not getting this issue on your sample.. any ideas?

Xamarin.Forms bug android resolved

Most helpful comment

sorry for my absence but im backkkkk....

I think this will be an issue within the circleframe render. Looks most likely to do with when it overrides the original drawing elements, it is momentarily rendering a regular frame, then it is replacing it with the new frame, then on next render it is doing the same.

Ill take a look into the renderer over weekend and see what I can find.

All 33 comments

Hi
Probably, the reason is in Xamarin.Forms
Could you provide fully reproduction?

Is this a video from the simulator?

@Phenek it seems to be a real device
https://play.google.com/store/apps/details?id=com.duapps.recorder&hl=en
But I'm not sure

@AndreiMisiukevich @Phenek Yes using DU Recorder app as at the link @AndreiMisiukevich mentioned

@LeoJHarris could you create small sample?
What version of XF do you use?

Xamarin.Forms version I am using is 3.1.0.697729. Small sample to follow soon

@LeoJHarris also what api level does your device use

Have tested on two device 5.1.1 and 7.1.1. Seeing the same issue on both.

@AndreiMisiukevich Will get a sample before the weekend, today hopefully my hands are a bit tied atm

@LeoJHarris sure
Probably I will try to reproduce it by myself, or somebody else has the same issue and provide the sample

I have made a sample repo will submit soon

@LeoJHarris don't forget

Sample.zip

Here you go :)

I copied my own project and stripped out basically everything apart from what was import for the sample. I haven't removed any external .libraries though

@LeoJHarris
image

It crashes on start(

Could you please test it on my sample?
https://github.com/AndreiMisiukevich/CardView/blob/master/PanCardViewSample/PanCardViewSample/Views/CarouselSampleXamlView.xaml

I still think that this is xamarin issue (XF 2.5 works fine)

I Have the same issue only in android
XF 3.1.0.697729

@amrkamal1993 try please with Forms 2.5
I guess, we should create issue for Xamarin team

@AndreiMisiukevich That's a bummer let me check that sample project again. I also think the issue exists in Xamarin.Forms version.

@LeoJHarris also, try please disable this class and try with forms 3.1-3.2 https://github.com/AndreiMisiukevich/CardView/blob/master/PanCardView.Droid/CircleFrameRenderer.cs

Perhaps, we should remove this class, if Xamarin fixed frame issue (transparent background and colored outline)

@AndreiMisiukevich Okay

@AndreiMisiukevich

I think we should remove the CircleFrame with just frame then at least the lines disappear, no issues anymore. I didnt try lowering XF package, infact I bumped to using latest.

ezgif com-resize

Try this:

Sample.zip

@AndreiMisiukevich BTW I'm still not sure about the side arrows, still doesn't feel totally responsive. Ill give it a go again on your sample and see what it is like removing that line you mentioned on a previous issue I commented in.

@LeoJHarris hi
Thanks, i appreciate any help with investigation.

@AndreiMisiukevich

I think we should remove the CircleFrame with just frame then at least the lines disappear, no issues anymore. I didnt try lowering XF package, infact I bumped to using latest.

ezgif com-resize

Try this:

Sample.zip

Yes, agreed. We should remove CircleFrame from IndicatorsControl for 3.2 and next releases
But we must preserve it for previous builds

@LeoJHarris https://github.com/AndreiMisiukevich/CardView/blob/master/PanCardView/Controls/IndicatorsControl.cs#L58

this line
Do you know, how can we check XF version?
For 3.2 and above we should use Frame, for lower CircleFrame, i'm sure
...
it seems doesn't work

var assemblyVersion = typeof(Label).GetTypeInfo().Assembly.GetName().Version;

sorry for my absence but im backkkkk....

I think this will be an issue within the circleframe render. Looks most likely to do with when it overrides the original drawing elements, it is momentarily rendering a regular frame, then it is replacing it with the new frame, then on next render it is doing the same.

Ill take a look into the renderer over weekend and see what I can find.

@AndreiMisiukevich Sorry I had a look and I couldn't find anything on checking the version of XF either

So, guys
What version of XF broke the Circle frame renderer?
I believe, we can find something new it XF and use reflection for determining current XF version installed on device -)

Frames have been Fixed with Xamarin.forms 3.0.
So the Circle frame renderer should work with lower version,
and have to be disabled with 3.0 and later versions

@Phenek great!) So, we can check for existing FlowDirection property in any view =)

also I think, i should change arrow from label to image
unicode arrow work so bed (align is wrong)

try 1.6.4-pre

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LeoJHarris picture LeoJHarris  路  3Comments

InquisitorJax picture InquisitorJax  路  6Comments

JTOne123 picture JTOne123  路  5Comments

jungjanos picture jungjanos  路  8Comments

baranpirincal picture baranpirincal  路  4Comments