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

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

@ -760,4 +760,4 @@
<Generator>MSBuild:UpdateDesignTimeXaml</Generator> <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
</Project> </Project>

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

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

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

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

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

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