mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 18:38:27 +03:00
Update to Forms 2.4
This commit is contained in:
parent
c06df3889b
commit
09ef1b66cc
14 changed files with 15 additions and 15 deletions
|
@ -25,7 +25,7 @@
|
||||||
<PackageReference Include="Xam.Plugin.Connectivity" Version="3.0.3" />
|
<PackageReference Include="Xam.Plugin.Connectivity" Version="3.0.3" />
|
||||||
<PackageReference Include="Xam.Plugins.Settings" Version="3.1.1" />
|
<PackageReference Include="Xam.Plugins.Settings" Version="3.1.1" />
|
||||||
<PackageReference Include="Xamarin.FFImageLoading.Forms" Version="2.2.9" />
|
<PackageReference Include="Xamarin.FFImageLoading.Forms" Version="2.2.9" />
|
||||||
<PackageReference Include="Xamarin.Forms" Version="2.3.4.267" />
|
<PackageReference Include="Xamarin.Forms" Version="2.4.0.91020" />
|
||||||
<PackageReference Include="XLabs.IoC" Version="2.0.5782" />
|
<PackageReference Include="XLabs.IoC" Version="2.0.5782" />
|
||||||
<PackageReference Include="ZXing.Net.Mobile.Forms" Version="2.1.47" />
|
<PackageReference Include="ZXing.Net.Mobile.Forms" Version="2.1.47" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace Bit.App.Controls
|
||||||
|
|
||||||
protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint)
|
protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint)
|
||||||
{
|
{
|
||||||
if(!VerticalOptions.Expands && Device.RuntimePlatform != Device.Windows)
|
if(!VerticalOptions.Expands && Device.RuntimePlatform != Device.UWP)
|
||||||
{
|
{
|
||||||
var reflectionService = Resolver.Resolve<IReflectionService>();
|
var reflectionService = Resolver.Resolve<IReflectionService>();
|
||||||
var baseBaseOnSizeRequest = reflectionService.GetVisualElementOnSizeRequest(this);
|
var baseBaseOnSizeRequest = reflectionService.GetVisualElementOnSizeRequest(this);
|
||||||
|
|
|
@ -68,7 +68,7 @@ namespace Bit.App.Pages
|
||||||
Children = { _zxing, _overlay }
|
Children = { _zxing, _overlay }
|
||||||
};
|
};
|
||||||
|
|
||||||
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Windows)
|
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.UWP)
|
||||||
{
|
{
|
||||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ namespace Bit.App.Pages
|
||||||
Spacing = 0
|
Spacing = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Windows)
|
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.UWP)
|
||||||
{
|
{
|
||||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ namespace Bit.App.Pages
|
||||||
Title = AppResources.AddFolder;
|
Title = AppResources.AddFolder;
|
||||||
Content = table;
|
Content = table;
|
||||||
ToolbarItems.Add(saveToolBarItem);
|
ToolbarItems.Add(saveToolBarItem);
|
||||||
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Windows)
|
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.UWP)
|
||||||
{
|
{
|
||||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
|
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ namespace Bit.App.Pages
|
||||||
Title = AppResources.EditFolder;
|
Title = AppResources.EditFolder;
|
||||||
Content = mainTable;
|
Content = mainTable;
|
||||||
ToolbarItems.Add(saveToolBarItem);
|
ToolbarItems.Add(saveToolBarItem);
|
||||||
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Windows)
|
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.UWP)
|
||||||
{
|
{
|
||||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
|
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ namespace Bit.App.Pages
|
||||||
Spacing = 0
|
Spacing = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Windows)
|
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.UWP)
|
||||||
{
|
{
|
||||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ namespace Bit.App.Pages
|
||||||
ItemTemplate = new DataTemplate(() => new SettingsFolderListViewCell(this))
|
ItemTemplate = new DataTemplate(() => new SettingsFolderListViewCell(this))
|
||||||
};
|
};
|
||||||
|
|
||||||
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Windows)
|
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.UWP)
|
||||||
{
|
{
|
||||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
||||||
}
|
}
|
||||||
|
|
|
@ -223,7 +223,7 @@ namespace Bit.App.Pages
|
||||||
Content = StackLayout
|
Content = StackLayout
|
||||||
};
|
};
|
||||||
|
|
||||||
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Windows)
|
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.UWP)
|
||||||
{
|
{
|
||||||
analyticsTable.RowHeight = websiteIconsTable.RowHeight = totpTable.RowHeight = -1;
|
analyticsTable.RowHeight = websiteIconsTable.RowHeight = totpTable.RowHeight = -1;
|
||||||
analyticsTable.EstimatedRowHeight = websiteIconsTable.EstimatedRowHeight =
|
analyticsTable.EstimatedRowHeight = websiteIconsTable.EstimatedRowHeight =
|
||||||
|
|
|
@ -56,7 +56,7 @@ namespace Bit.App.Pages
|
||||||
PinControl.Label.GestureRecognizers.Add(Tgr);
|
PinControl.Label.GestureRecognizers.Add(Tgr);
|
||||||
instructionLabel.GestureRecognizers.Add(Tgr);
|
instructionLabel.GestureRecognizers.Add(Tgr);
|
||||||
|
|
||||||
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Windows)
|
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.UWP)
|
||||||
{
|
{
|
||||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
|
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace Bit.App.Pages
|
||||||
Padding = new Thickness(15, 0)
|
Padding = new Thickness(15, 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Windows)
|
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.UWP)
|
||||||
{
|
{
|
||||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,7 +156,7 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
Title = AppResources.SearchVault;
|
Title = AppResources.SearchVault;
|
||||||
|
|
||||||
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Windows)
|
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.UWP)
|
||||||
{
|
{
|
||||||
ToolbarItems.Add(new DismissModalToolBarItem(this));
|
ToolbarItems.Add(new DismissModalToolBarItem(this));
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace Bit.App
|
||||||
|
|
||||||
public static async Task PushForDeviceAsync(this INavigation navigation, Page page)
|
public static async Task PushForDeviceAsync(this INavigation navigation, Page page)
|
||||||
{
|
{
|
||||||
if (Device.RuntimePlatform != Device.Windows)
|
if (Device.RuntimePlatform != Device.UWP)
|
||||||
{
|
{
|
||||||
await navigation.PushModalAsync(new ExtendedNavigationPage(page), true);
|
await navigation.PushModalAsync(new ExtendedNavigationPage(page), true);
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ namespace Bit.App
|
||||||
{
|
{
|
||||||
if(navigation.ModalStack.Count < 1)
|
if(navigation.ModalStack.Count < 1)
|
||||||
{
|
{
|
||||||
if (navigation.NavigationStack.Count > 0 && Device.RuntimePlatform == Device.Windows)
|
if (navigation.NavigationStack.Count > 0 && Device.RuntimePlatform == Device.UWP)
|
||||||
{
|
{
|
||||||
await navigation.PopAsync();
|
await navigation.PopAsync();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace Bit.App.Utilities
|
||||||
return Android;
|
return Android;
|
||||||
case Device.WinPhone:
|
case Device.WinPhone:
|
||||||
return WinPhone;
|
return WinPhone;
|
||||||
case Device.Windows:
|
case Device.UWP:
|
||||||
return Windows;
|
return Windows;
|
||||||
default:
|
default:
|
||||||
throw new Exception("Unsupported platform.");
|
throw new Exception("Unsupported platform.");
|
||||||
|
|
Loading…
Reference in a new issue