This commit is contained in:
Samantha Houts 2017-10-25 10:41:20 -07:00
Родитель e004fb034c 32e739891f
Коммит 4ce482bf3c
4 изменённых файлов: 6 добавлений и 7 удалений

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

@ -136,7 +136,7 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
if (disposing)
{
if (_currentFragment != null)
if (_currentFragment != null && !FragmentManager.IsDestroyed)
{
FragmentTransaction transaction = FragmentManager.BeginTransaction();
transaction.Remove(_currentFragment);

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

@ -128,14 +128,13 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
{
_disposed = true;
var activity = (FormsAppCompatActivity)Context;
// API only exists on newer android YAY
if ((int)Build.VERSION.SdkInt >= 17)
{
if (!activity.IsDestroyed)
{
FragmentManager fm = FragmentManager;
if (!fm.IsDestroyed)
{
FragmentTransaction trans = fm.BeginTransaction();
foreach (Fragment fragment in _fragmentStack)
trans.Remove(fragment);

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

@ -185,7 +185,7 @@
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
Margin="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" Grid.Row="1"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" VerticalAlignment="Bottom"
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" ZoomMode="Disabled" />
<ContentControl x:Name="PlaceholderTextContentPresenter" Grid.ColumnSpan="2"
Content="{TemplateBinding PlaceholderText}"