-
Notifications
You must be signed in to change notification settings - Fork 749
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2360 from unoplatform/dev/djo/webview-android-fix
[Android] Fix WebView clipping issue
- Loading branch information
Showing
4 changed files
with
105 additions
and
15 deletions.
There are no files selected for viewing
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
47 changes: 47 additions & 0 deletions
47
src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/WebView/WebView_Animated_Opacity.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,47 @@ | ||
<UserControl x:Class="UITests.Shared.Windows_UI_Xaml_Controls.WebView.WebView_Animated_Opacity" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:UITests.Shared.Windows_UI_Xaml_Controls.WebView" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
d:DesignHeight="300" | ||
d:DesignWidth="400"> | ||
|
||
|
||
<Grid Background="Red"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="*" /> | ||
</Grid.RowDefinitions> | ||
<Button Content="Some Text !" /> | ||
|
||
<ContentControl x:Name="test" | ||
Grid.Row="1" | ||
Width="100" | ||
Height="100"> | ||
<ContentControl.Template> | ||
<ControlTemplate TargetType="ContentControl"> | ||
<Grid> | ||
<VisualStateManager.VisualStateGroups> | ||
<VisualStateGroup x:Name="LoadingStates"> | ||
<VisualState x:Name="Loading"> | ||
<Storyboard> | ||
<DoubleAnimation Storyboard.TargetName="PART_WebView" | ||
Storyboard.TargetProperty="Opacity" | ||
Duration="0:0:0.1" | ||
To="1" /> | ||
</Storyboard> | ||
</VisualState> | ||
</VisualStateGroup> | ||
</VisualStateManager.VisualStateGroups> | ||
|
||
<!-- Value --> | ||
<WebView x:Name="PART_WebView" | ||
Source="https://web.archive.org/web/20181010203846/https://www.bloomberg.com/view/articles/2018-10-09/google-is-big-and-google-was-small" /> | ||
</Grid> | ||
</ControlTemplate> | ||
</ContentControl.Template> | ||
</ContentControl> | ||
</Grid> | ||
</UserControl> |
31 changes: 31 additions & 0 deletions
31
...mplesApp/UITests.Shared/Windows_UI_Xaml_Controls/WebView/WebView_Animated_Opacity.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,31 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Uno.UI.Samples.Controls; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Controls.Primitives; | ||
using Windows.UI.Xaml.Data; | ||
using Windows.UI.Xaml.Input; | ||
using Windows.UI.Xaml.Media; | ||
using Windows.UI.Xaml.Navigation; | ||
|
||
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236 | ||
|
||
namespace UITests.Shared.Windows_UI_Xaml_Controls.WebView | ||
{ | ||
[SampleControlInfo(description: "Opacity is animated on WebView. It shouldn't exceed bounds while page is loading (Android bug #2006)")] | ||
public sealed partial class WebView_Animated_Opacity : UserControl | ||
{ | ||
public WebView_Animated_Opacity() | ||
{ | ||
this.InitializeComponent(); | ||
|
||
VisualStateManager.GoToState(test, "Loading", true); | ||
} | ||
} | ||
} |
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