Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] SwipeView removes Frame borders on Android #11831

Closed
EmilAlipiev opened this issue Aug 18, 2020 · 3 comments · Fixed by #11947
Closed

[Bug] SwipeView removes Frame borders on Android #11831

EmilAlipiev opened this issue Aug 18, 2020 · 3 comments · Fixed by #11947
Labels
a/swipeview e/2 🕑 2 in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛
Milestone

Comments

@EmilAlipiev
Copy link
Contributor

EmilAlipiev commented Aug 18, 2020

Description

When using Frame inside SwipeView, Frame borders are not working. Frame appears without borders.

Steps to Reproduce

Use the code and template as below,

 
   <Style x:Key="CollectionSwipeSelectedStyle" TargetType="SwipeView">
                <Setter Property="VisualStateManager.VisualStateGroups">
                    <VisualStateGroupList>
                        <VisualStateGroup x:Name="CommonStatesSwipe">
                            <VisualState x:Name="Normal">
                                <VisualState.Setters>
                                    <Setter Property="BackgroundColor" Value="White" />
                                </VisualState.Setters>
                            </VisualState>
                            <VisualState x:Name="Selected">
                                <VisualState.Setters>
                                    <Setter Property="BackgroundColor" Value="LightGray" />
                                </VisualState.Setters>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateGroupList>
                </Setter>
            </Style>

      <CollectionView.ItemTemplate>
                <DataTemplate>
                    <SwipeView Style="{StaticResource CollectionSwipeSelectedStyle}">
                        <SwipeView.RightItems>
                            <SwipeItems>
                                <SwipeItemView
                                    BackgroundColor="#DB0000"
                                    Command="{Binding Path=BindingContext.DeleteCmd, Source={x:Reference Name=CollectionView}}"
                                    CommandParameter="{Binding .}"
                                    HeightRequest="83"
                                    WidthRequest="77">                        
                                </SwipeItemView>
                            </SwipeItems>
                        </SwipeView.RightItems>
                        <Frame
                            Padding="1"
                            BorderColor="Silver"
                            WidthRequest="588"> 
 

Expected Behavior

Borders to appear

Actual Behavior

without borders

Basic Information

  • Version with issue:

  • Last known good version:

  • IDE:

  • Platform Target Frameworks:

    • Android: 9
  • Nuget Packages: XF 4.8

  • Affected Devices: Android 9 emulator

@EmilAlipiev EmilAlipiev added s/unverified New report that has yet to be verified t/bug 🐛 labels Aug 18, 2020
@samhouts samhouts added this to New in Triage Aug 18, 2020
@jsuarezruiz
Copy link
Contributor

@EmilAlipiev Do you mean the border color?
issue11831

@jsuarezruiz jsuarezruiz moved this from New to Needs Info in Triage Aug 18, 2020
@jsuarezruiz jsuarezruiz added the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Aug 18, 2020
@EmilAlipiev
Copy link
Contributor Author

Hi @jsuarezruiz,
I think that in your sample, you didn't use my exact code, please use the exact code and you will see that it is caused by CollectionSwipeSelectedStyle, I used. There is a conflict here.

I need to have selection color on CollectionView Itemtemplate but this only works on top view which is swipeview, it doesnt work well if i use on frame. On the other hand if I use it, this time Frame borders are not visible. I tried using "Transparent" instead of "White" on Normal visualstate but this didnt help. Borders were still not appearing.

@samhouts samhouts removed the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Aug 27, 2020
@samhouts samhouts moved this from Needs Info to New in Triage Aug 27, 2020
@jsuarezruiz jsuarezruiz added this to Backlog in SwipeView via automation Aug 28, 2020
@jsuarezruiz jsuarezruiz added e/2 🕑 2 and removed s/unverified New report that has yet to be verified labels Aug 28, 2020
@jsuarezruiz jsuarezruiz moved this from New to Ready For Work in Triage Aug 28, 2020
@samhouts samhouts removed this from Ready For Work in Triage Aug 28, 2020
@jsuarezruiz jsuarezruiz moved this from Backlog to In Progress in SwipeView Aug 28, 2020
@jsuarezruiz jsuarezruiz moved this from To do to In progress in Android Ready For Work Aug 28, 2020
@jsuarezruiz
Copy link
Contributor

@EmilAlipiev Thanks for the feedback. After apply your style with VSM, etc. I understand what happens. Will be fixed by #11947

@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Aug 28, 2020
@samhouts samhouts added this to In Progress in vNext+1 (5.0.0) Aug 28, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 31, 2020
Android Ready For Work automation moved this from In progress to Done Sep 22, 2020
SwipeView automation moved this from In Progress to Done Sep 22, 2020
vNext+1 (5.0.0) automation moved this from In Progress to Done Sep 22, 2020
rmarinho added a commit that referenced this issue Sep 22, 2020
* Added repro sample

* Fixed issue with default SwipeView BackgroundColor on iOS

* Updated the sample

* Avoid to set the Content BackgroundColor updating the SwipeView BackgroundColor

* Fixed build error

* Fixed build error

* Fix build error

Co-authored-by: Rui Marinho <me@ruimarinho.net>
@samhouts samhouts removed this from Done in Android Ready For Work Nov 3, 2020
@samhouts samhouts removed this from Done in SwipeView Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/swipeview e/2 🕑 2 in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants