This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Android] Fixed brush background issue scrolling ListView (#13402)
* Fixed brush background issue scrolling ListView on Android * Update Issue13392.xaml.cs --------- Co-authored-by: Rachel Kang <rachelkang@microsoft.com> Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
- Loading branch information
1 parent
6293975
commit 88b70ad
Showing
4 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue13392.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<local:TestContentPage | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Title="Test 13392" xmlns:local="using:Xamarin.Forms.Controls" | ||
x:Class="Xamarin.Forms.Controls.Issues.Issue13392"> | ||
<StackLayout> | ||
<Label | ||
Padding="12" | ||
BackgroundColor="Black" | ||
TextColor="White" | ||
Text="Scroll the ListView to the end, if all the cells have a gradient background test has passed."/> | ||
<ListView | ||
RowHeight="200"> | ||
<ListView.ItemsSource> | ||
<x:Array Type="{x:Type x:String}"> | ||
<x:String>Item 1</x:String> | ||
<x:String>Item 2</x:String> | ||
<x:String>Item 3</x:String> | ||
<x:String>Item 4</x:String> | ||
<x:String>Item 5</x:String> | ||
<x:String>Item 6</x:String> | ||
<x:String>Item 7</x:String> | ||
<x:String>Item 8</x:String> | ||
<x:String>Item 9</x:String> | ||
<x:String>Item 10</x:String> | ||
</x:Array> | ||
</ListView.ItemsSource> | ||
<ListView.ItemTemplate> | ||
<DataTemplate> | ||
<ViewCell Height="300"> | ||
<Frame Margin="10,7,7,0" CornerRadius="5" HasShadow="True"> | ||
<Frame.Background> | ||
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1"> | ||
<GradientStop Color="#0039AC" Offset="0.1"/> | ||
<GradientStop Color="#004CDD" Offset="0.5"/> | ||
<GradientStop Color="#3476FC" Offset="1.0"/> | ||
</LinearGradientBrush> | ||
</Frame.Background> | ||
<Grid> | ||
<Label | ||
Text="{Binding}" | ||
TextColor="White" | ||
FontSize="Medium" | ||
VerticalOptions="Center" | ||
HorizontalOptions="Center" /> | ||
</Grid> | ||
</Frame> | ||
</ViewCell> | ||
</DataTemplate> | ||
</ListView.ItemTemplate> | ||
</ListView> | ||
</StackLayout> | ||
</local:TestContentPage> |
25 changes: 25 additions & 0 deletions
25
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue13392.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Xamarin.Forms.CustomAttributes; | ||
|
||
#if UITEST | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
using Xamarin.Forms.Core.UITests; | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
[Issue(IssueTracker.Github, 13392, "[Bug] Brush dissappear after scroll in ListView on Android", PlatformAffected.Android)] | ||
public partial class Issue13392 : TestContentPage | ||
{ | ||
public Issue13392() | ||
{ | ||
#if APP | ||
InitializeComponent(); | ||
#endif | ||
} | ||
|
||
protected override void Init() | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters