[Android] fix removed NativeSizeChanged (#4395)

This commit is contained in:
Shane Neuville 2018-11-13 12:22:49 -07:00 коммит произвёл GitHub
Родитель 26d8b1fc08
Коммит 41e5358169
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 56 добавлений и 36 удалений

Просмотреть файл

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@ -17,7 +18,7 @@ namespace Xamarin.Forms.Controls
var disabled = new Image { Source = ImageSource.FromFile("cover1.jpg") };
var rotate = new Image { Source = ImageSource.FromFile("cover1.jpg") };
var transparent = new Image { Source = ImageSource.FromFile("cover1.jpg") };
var embedded = new Image { Source = ImageSource.FromResource ("Xamarin.Forms.Controls.ControlGalleryPages.crimson.jpg", typeof (ImageGallery)) };
var embedded = new Image { Source = ImageSource.FromResource("Xamarin.Forms.Controls.GalleryPages.crimson.jpg", typeof(ImageGallery).GetTypeInfo().Assembly) };
// let the stack shrink the images
normal.MinimumHeightRequest = normal.MinimumHeightRequest = 10;
@ -30,22 +31,37 @@ namespace Xamarin.Forms.Controls
rotate.GestureRecognizers.Add(new TapGestureRecognizer { Command = new Command(o => rotate.RelRotateTo(180)) });
transparent.Opacity = .5;
Content = new StackLayout {
Content =
new ScrollView()
{
Content = new StackLayout
{
Orientation = StackOrientation.Horizontal,
Children = {
new StackLayout {
Children =
{
new StackLayout
{
//MinimumWidthRequest = 20,
HorizontalOptions = LayoutOptions.FillAndExpand,
Children = {
Children =
{
new Label(){ Text = "Normal"},
normal,
new Label(){ Text = "Disabled"},
disabled,
new Label(){ Text = "Transparent"},
transparent,
new Label(){ Text = "Rotate"},
rotate,
new Label(){ Text = "Embedded"},
embedded,
new StackLayout {
new Label(){ Text = "Horizontal"},
new StackLayout
{
HeightRequest = 30,
Orientation = StackOrientation.Horizontal,
Children = {
Children =
{
new Image {Source = "cover1.jpg"},
new Image {Source = "cover1.jpg"},
new Image {Source = "cover1.jpg"},
@ -54,9 +70,11 @@ namespace Xamarin.Forms.Controls
}
}
},
new StackLayout {
new StackLayout
{
WidthRequest = 30,
Children = {
Children =
{
new Image {Source = "cover1.jpg"},
new Image {Source = "cover1.jpg"},
new Image {Source = "cover1.jpg"},
@ -65,6 +83,7 @@ namespace Xamarin.Forms.Controls
}
}
}
};
}
}

Просмотреть файл

@ -80,6 +80,7 @@ namespace Xamarin.Forms.Platform.Android
bitmap?.Dispose();
imageController?.SetIsLoading(false);
imageController?.NativeSizeChanged();
}
}
}