From f0662bb878d3aeeb44f586a9c7c9a437ebbd4949 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 30 Dec 2017 21:18:24 -0500 Subject: [PATCH] adjust bottom paddings on listviews/tableviews --- src/Android/Android.csproj | 1 + .../Controls/ExtendedListViewRenderer.cs | 33 ++++++++++++++++ .../Controls/ExtendedTableViewRenderer.cs | 10 +++++ src/Android/Resources/Resource.Designer.cs | 33 +++++++++++++--- src/App/Controls/ExtendedListView.cs | 16 ++++++++ src/App/Controls/ExtendedTableView.cs | 10 ++--- src/App/Pages/EnvironmentPage.cs | 4 ++ .../Pages/Settings/SettingsAddFolderPage.cs | 4 ++ .../Pages/Settings/SettingsEditFolderPage.cs | 4 ++ .../Pages/Settings/SettingsListFoldersPage.cs | 5 ++- src/App/Pages/Settings/SettingsPage.cs | 4 ++ src/App/Pages/Tools/ToolsPage.cs | 4 ++ .../Pages/Tools/ToolsPasswordGeneratorPage.cs | 4 ++ src/App/Pages/Vault/VaultAddCipherPage.cs | 4 ++ src/App/Pages/Vault/VaultAttachmentsPage.cs | 8 +++- .../Vault/VaultAutofillListCiphersPage.cs | 39 ++++++++----------- src/App/Pages/Vault/VaultCustomFieldsPage.cs | 4 ++ src/App/Pages/Vault/VaultEditCipherPage.cs | 4 ++ src/App/Pages/Vault/VaultListCiphersPage.cs | 9 ++++- src/App/Pages/Vault/VaultListGroupingsPage.cs | 5 ++- src/App/Pages/Vault/VaultViewCipherPage.cs | 4 ++ ...enderer.cs => ExtendedListViewRenderer.cs} | 11 +++--- src/iOS/iOS.csproj | 2 +- 23 files changed, 175 insertions(+), 47 deletions(-) create mode 100644 src/Android/Controls/ExtendedListViewRenderer.cs create mode 100644 src/App/Controls/ExtendedListView.cs rename src/iOS/Controls/{ListViewRenderer.cs => ExtendedListViewRenderer.cs} (76%) diff --git a/src/Android/Android.csproj b/src/Android/Android.csproj index fad1971a4..675fd5249 100644 --- a/src/Android/Android.csproj +++ b/src/Android/Android.csproj @@ -86,6 +86,7 @@ + diff --git a/src/Android/Controls/ExtendedListViewRenderer.cs b/src/Android/Controls/ExtendedListViewRenderer.cs new file mode 100644 index 000000000..3b0663ad5 --- /dev/null +++ b/src/Android/Controls/ExtendedListViewRenderer.cs @@ -0,0 +1,33 @@ +using System; +using Bit.Android.Controls; +using Bit.App.Controls; +using Xamarin.Forms; +using Xamarin.Forms.Platform.Android; +using Android.Content; +using Android.Views; + +[assembly: ExportRenderer(typeof(ExtendedListView), typeof(ExtendedListViewRenderer))] +namespace Bit.Android.Controls +{ + public class ExtendedListViewRenderer : ListViewRenderer + { + public ExtendedListViewRenderer(Context context) + : base(context) + { } + + protected override void OnElementChanged(ElementChangedEventArgs e) + { + base.OnElementChanged(e); + + if(e.NewElement is ExtendedListView listView) + { + if(listView.BottomPadding > 0) + { + Control.SetPadding(0, 0, 0, listView.BottomPadding); + Control.SetClipToPadding(false); + Control.ScrollBarStyle = ScrollbarStyles.OutsideOverlay; + } + } + } + } +} diff --git a/src/Android/Controls/ExtendedTableViewRenderer.cs b/src/Android/Controls/ExtendedTableViewRenderer.cs index ab1224787..8737a6f3d 100644 --- a/src/Android/Controls/ExtendedTableViewRenderer.cs +++ b/src/Android/Controls/ExtendedTableViewRenderer.cs @@ -23,6 +23,16 @@ namespace Bit.Android.Controls base.OnElementChanged(e); Control.Divider = null; Control.DividerHeight = 0; + + if(e.NewElement is ExtendedTableView tableView) + { + if(tableView.BottomPadding > 0) + { + Control.SetPadding(0, 0, 0, tableView.BottomPadding); + Control.SetClipToPadding(false); + Control.ScrollBarStyle = ScrollbarStyles.OutsideOverlay; + } + } } protected override TableViewModelRenderer GetModelRenderer(AListView listView, TableView view) diff --git a/src/Android/Resources/Resource.Designer.cs b/src/Android/Resources/Resource.Designer.cs index 3ffd358ea..c937e355e 100644 --- a/src/Android/Resources/Resource.Designer.cs +++ b/src/Android/Resources/Resource.Designer.cs @@ -6475,17 +6475,17 @@ namespace Bit.Android // aapt resource value: 0x7f090051 public const int ApplicationName = 2131296337; - // aapt resource value: 0x7f0900ab - public const int AutoFillServiceDescription = 2131296427; + // aapt resource value: 0x7f0900b2 + public const int AutoFillServiceDescription = 2131296434; - // aapt resource value: 0x7f0900aa - public const int AutoFillServiceSummary = 2131296426; + // aapt resource value: 0x7f0900b1 + public const int AutoFillServiceSummary = 2131296433; // aapt resource value: 0x7f090050 public const int Hello = 2131296336; - // aapt resource value: 0x7f0900ac - public const int MyVault = 2131296428; + // aapt resource value: 0x7f0900b3 + public const int MyVault = 2131296435; // aapt resource value: 0x7f090027 public const int abc_action_bar_home_description = 2131296295; @@ -6640,6 +6640,27 @@ namespace Bit.Android // aapt resource value: 0x7f09000f public const int common_signin_button_text_long = 2131296271; + // aapt resource value: 0x7f0900ac + public const int default_web_client_id = 2131296428; + + // aapt resource value: 0x7f0900ad + public const int firebase_database_url = 2131296429; + + // aapt resource value: 0x7f0900aa + public const int gcm_defaultSenderId = 2131296426; + + // aapt resource value: 0x7f0900ae + public const int google_api_key = 2131296430; + + // aapt resource value: 0x7f0900ab + public const int google_app_id = 2131296427; + + // aapt resource value: 0x7f0900af + public const int google_crash_reporting_api_key = 2131296431; + + // aapt resource value: 0x7f0900b0 + public const int google_storage_bucket = 2131296432; + // aapt resource value: 0x7f090052 public const int hockeyapp_crash_dialog_app_name_fallback = 2131296338; diff --git a/src/App/Controls/ExtendedListView.cs b/src/App/Controls/ExtendedListView.cs new file mode 100644 index 000000000..2d34bad6b --- /dev/null +++ b/src/App/Controls/ExtendedListView.cs @@ -0,0 +1,16 @@ +using Xamarin.Forms; + +namespace Bit.App.Controls +{ + public class ExtendedListView : ListView + { + public static readonly BindableProperty BottomPaddingProperty = + BindableProperty.Create(nameof(BottomPadding), typeof(int), typeof(ExtendedTableView), 0); + + public ExtendedListView() { } + public ExtendedListView(ListViewCachingStrategy cachingStrategy) + : base(cachingStrategy) { } + + public int BottomPadding { get; set; } + } +} diff --git a/src/App/Controls/ExtendedTableView.cs b/src/App/Controls/ExtendedTableView.cs index 85dd30399..e300b19a6 100644 --- a/src/App/Controls/ExtendedTableView.cs +++ b/src/App/Controls/ExtendedTableView.cs @@ -1,8 +1,4 @@ -using System; -using Xamarin.Forms; -using System.Reflection; -using System.Reflection.Emit; -using System.Runtime.InteropServices; +using Xamarin.Forms; using XLabs.Ioc; using Bit.App.Abstractions; @@ -19,6 +15,9 @@ namespace Bit.App.Controls public static readonly BindableProperty SeparatorColorProperty = BindableProperty.Create(nameof(SeparatorColor), typeof(Color), typeof(ExtendedTableView), Color.FromHex("d2d6de")); + public static readonly BindableProperty BottomPaddingProperty = + BindableProperty.Create(nameof(BottomPadding), typeof(int), typeof(ExtendedTableView), 0); + public bool EnableScrolling { get { return (bool)GetValue(EnableScrollingProperty); } @@ -40,6 +39,7 @@ namespace Bit.App.Controls public int EstimatedRowHeight { get; set; } public bool NoHeader { get; set; } public bool NoFooter { get; set; } + public int BottomPadding { get; set; } protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { diff --git a/src/App/Pages/EnvironmentPage.cs b/src/App/Pages/EnvironmentPage.cs index 1db08c0dc..8e7fc7ad9 100644 --- a/src/App/Pages/EnvironmentPage.cs +++ b/src/App/Pages/EnvironmentPage.cs @@ -123,6 +123,10 @@ namespace Bit.App.Pages MessagingCenter.Send(Application.Current, "ShowStatusBar", false); })); } + else if(Device.RuntimePlatform == Device.Android) + { + table2.BottomPadding = 50; + } ToolbarItems.Add(toolbarItem); Title = AppResources.Settings; diff --git a/src/App/Pages/Settings/SettingsAddFolderPage.cs b/src/App/Pages/Settings/SettingsAddFolderPage.cs index 567607856..c18ba43d9 100644 --- a/src/App/Pages/Settings/SettingsAddFolderPage.cs +++ b/src/App/Pages/Settings/SettingsAddFolderPage.cs @@ -54,6 +54,10 @@ namespace Bit.App.Pages table.RowHeight = -1; table.EstimatedRowHeight = 70; } + else if(Device.RuntimePlatform == Device.Android) + { + table.BottomPadding = 50; + } var saveToolBarItem = new ToolbarItem(AppResources.Save, Helpers.ToolbarImage("envelope.png"), async () => { diff --git a/src/App/Pages/Settings/SettingsEditFolderPage.cs b/src/App/Pages/Settings/SettingsEditFolderPage.cs index 01446e61d..d441ffb8a 100644 --- a/src/App/Pages/Settings/SettingsEditFolderPage.cs +++ b/src/App/Pages/Settings/SettingsEditFolderPage.cs @@ -71,6 +71,10 @@ namespace Bit.App.Pages mainTable.RowHeight = -1; mainTable.EstimatedRowHeight = 70; } + else if(Device.RuntimePlatform == Device.Android) + { + mainTable.BottomPadding = 50; + } var saveToolBarItem = new ToolbarItem(AppResources.Save, Helpers.ToolbarImage("envelope.png"), async () => { diff --git a/src/App/Pages/Settings/SettingsListFoldersPage.cs b/src/App/Pages/Settings/SettingsListFoldersPage.cs index 43b9101f1..3adb6f9d4 100644 --- a/src/App/Pages/Settings/SettingsListFoldersPage.cs +++ b/src/App/Pages/Settings/SettingsListFoldersPage.cs @@ -23,13 +23,13 @@ namespace Bit.App.Pages public ExtendedObservableCollection Folders { get; private set; } = new ExtendedObservableCollection(); - public ListView ListView { get; set; } + public ExtendedListView ListView { get; set; } private AddFolderToolBarItem AddItem { get; set; } public Fab Fab { get; set; } private void Init() { - ListView = new ListView + ListView = new ExtendedListView { ItemsSource = Folders, ItemTemplate = new DataTemplate(() => new SettingsFolderListViewCell(this)) @@ -47,6 +47,7 @@ namespace Bit.App.Pages { await Navigation.PushForDeviceAsync(new SettingsAddFolderPage()); }); + ListView.BottomPadding = 50; } else { diff --git a/src/App/Pages/Settings/SettingsPage.cs b/src/App/Pages/Settings/SettingsPage.cs index 85b2b8aba..df21455e1 100644 --- a/src/App/Pages/Settings/SettingsPage.cs +++ b/src/App/Pages/Settings/SettingsPage.cs @@ -488,6 +488,10 @@ namespace Bit.App.Pages RowHeight = -1; EstimatedRowHeight = 44; } + else if(Device.RuntimePlatform == Device.Android) + { + BottomPadding = 50; + } } } diff --git a/src/App/Pages/Tools/ToolsPage.cs b/src/App/Pages/Tools/ToolsPage.cs index b7be23533..49d34ee13 100644 --- a/src/App/Pages/Tools/ToolsPage.cs +++ b/src/App/Pages/Tools/ToolsPage.cs @@ -71,6 +71,10 @@ namespace Bit.App.Pages table.RowHeight = -1; table.EstimatedRowHeight = 100; } + else if(Device.RuntimePlatform == Device.Android) + { + table.BottomPadding = 50; + } Title = AppResources.Tools; Content = table; diff --git a/src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs b/src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs index 65f3a7e4c..7e7eeb686 100644 --- a/src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs +++ b/src/App/Pages/Tools/ToolsPasswordGeneratorPage.cs @@ -158,6 +158,10 @@ namespace Bit.App.Pages ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel)); } } + else if(Device.RuntimePlatform == Device.Android) + { + table.BottomPadding = 50; + } var stackLayout = new StackLayout { diff --git a/src/App/Pages/Vault/VaultAddCipherPage.cs b/src/App/Pages/Vault/VaultAddCipherPage.cs index 843055ae4..d0405a3f8 100644 --- a/src/App/Pages/Vault/VaultAddCipherPage.cs +++ b/src/App/Pages/Vault/VaultAddCipherPage.cs @@ -564,6 +564,10 @@ namespace Bit.App.Pages Table.RowHeight = -1; Table.EstimatedRowHeight = 70; } + else if(Device.RuntimePlatform == Device.Android) + { + Table.BottomPadding = 50; + } } private void InitSave() diff --git a/src/App/Pages/Vault/VaultAttachmentsPage.cs b/src/App/Pages/Vault/VaultAttachmentsPage.cs index f09c3b3e1..628bbcc36 100644 --- a/src/App/Pages/Vault/VaultAttachmentsPage.cs +++ b/src/App/Pages/Vault/VaultAttachmentsPage.cs @@ -43,7 +43,7 @@ namespace Bit.App.Pages public ExtendedObservableCollection PresentationAttchments { get; private set; } = new ExtendedObservableCollection(); - public ListView ListView { get; set; } + public ExtendedListView ListView { get; set; } public StackLayout NoDataStackLayout { get; set; } public StackLayout AddNewStackLayout { get; set; } public Label FileLabel { get; set; } @@ -101,7 +101,7 @@ namespace Bit.App.Pages } }; - ListView = new ListView(ListViewCachingStrategy.RecycleElement) + ListView = new ExtendedListView(ListViewCachingStrategy.RecycleElement) { ItemsSource = PresentationAttchments, HasUnevenRows = true, @@ -196,6 +196,10 @@ namespace Bit.App.Pages ListView.BackgroundColor = Color.Transparent; ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close)); } + else if(Device.RuntimePlatform == Device.Android) + { + ListView.BottomPadding = 50; + } } protected async override void OnAppearing() diff --git a/src/App/Pages/Vault/VaultAutofillListCiphersPage.cs b/src/App/Pages/Vault/VaultAutofillListCiphersPage.cs index 21b9940c4..2f35883d7 100644 --- a/src/App/Pages/Vault/VaultAutofillListCiphersPage.cs +++ b/src/App/Pages/Vault/VaultAutofillListCiphersPage.cs @@ -51,13 +51,14 @@ namespace Bit.App.Pages Init(); } + public ContentView ContentView { get; set; } + public Fab Fab { get; set; } public ExtendedObservableCollection> PresentationCiphersGroup { get; private set; } = new ExtendedObservableCollection>(); public StackLayout NoDataStackLayout { get; set; } - public ListView ListView { get; set; } + public ExtendedListView ListView { get; set; } public ActivityIndicator LoadingIndicator { get; set; } private SearchToolBarItem SearchItem { get; set; } - private AddCipherToolBarItem AddCipherItem { get; set; } private IGoogleAnalyticsService GoogleAnalyticsService { get; set; } private IDeviceActionService DeviceActionService { get; set; } private string Uri { get; set; } @@ -87,12 +88,10 @@ namespace Bit.App.Pages Spacing = 20 }; - AddCipherItem = new AddCipherToolBarItem(this); - ToolbarItems.Add(AddCipherItem); SearchItem = new SearchToolBarItem(this); ToolbarItems.Add(SearchItem); - ListView = new ListView(ListViewCachingStrategy.RecycleElement) + ListView = new ExtendedListView(ListViewCachingStrategy.RecycleElement) { IsGroupingEnabled = true, ItemsSource = PresentationCiphersGroup, @@ -117,14 +116,22 @@ namespace Bit.App.Pages HorizontalOptions = LayoutOptions.Center }; - Content = LoadingIndicator; + ContentView = new ContentView + { + Content = LoadingIndicator + }; + + var fabLayout = new FabLayout(ContentView); + Fab = new Fab(fabLayout, "plus.png", async (sender, args) => await AddCipherAsync()); + ListView.BottomPadding = 170; + + Content = fabLayout; } protected override void OnAppearing() { base.OnAppearing(); ListView.ItemSelected += CipherSelected; - AddCipherItem.InitEvents(); SearchItem.InitEvents(); _filterResultsCancellationTokenSource = FetchAndLoadVault(); } @@ -133,7 +140,6 @@ namespace Bit.App.Pages { base.OnDisappearing(); ListView.ItemSelected -= CipherSelected; - AddCipherItem.Dispose(); SearchItem.Dispose(); } @@ -148,11 +154,11 @@ namespace Bit.App.Pages { if(PresentationCiphersGroup.Count > 0) { - Content = ListView; + ContentView.Content = ListView; } else { - Content = NoDataStackLayout; + ContentView.Content = NoDataStackLayout; } } @@ -249,7 +255,7 @@ namespace Bit.App.Pages ((ListView)sender).SelectedItem = null; } - private async void AddCipherAsync() + private async Task AddCipherAsync() { if(_appOptions.FillType.HasValue && _appOptions.FillType != CipherType.Login) { @@ -262,17 +268,6 @@ namespace Bit.App.Pages await Navigation.PushForDeviceAsync(pageForLogin); } - private class AddCipherToolBarItem : ExtendedToolbarItem - { - public AddCipherToolBarItem(VaultAutofillListCiphersPage page) - : base(() => page.AddCipherAsync()) - { - Text = AppResources.Add; - Icon = "plus.png"; - Priority = 2; - } - } - private class SearchToolBarItem : ExtendedToolbarItem { private readonly VaultAutofillListCiphersPage _page; diff --git a/src/App/Pages/Vault/VaultCustomFieldsPage.cs b/src/App/Pages/Vault/VaultCustomFieldsPage.cs index abfc55f71..91896e35a 100644 --- a/src/App/Pages/Vault/VaultCustomFieldsPage.cs +++ b/src/App/Pages/Vault/VaultCustomFieldsPage.cs @@ -140,6 +140,10 @@ namespace Bit.App.Pages Table.RowHeight = -1; Table.EstimatedRowHeight = 44; } + else if(Device.RuntimePlatform == Device.Android) + { + Table.BottomPadding = 50; + } } protected async override void OnAppearing() diff --git a/src/App/Pages/Vault/VaultEditCipherPage.cs b/src/App/Pages/Vault/VaultEditCipherPage.cs index 0c3ab6384..40dd242de 100644 --- a/src/App/Pages/Vault/VaultEditCipherPage.cs +++ b/src/App/Pages/Vault/VaultEditCipherPage.cs @@ -433,6 +433,10 @@ namespace Bit.App.Pages Table.RowHeight = -1; Table.EstimatedRowHeight = 70; } + else if(Device.RuntimePlatform == Device.Android) + { + Table.BottomPadding = 50; + } } private void InitSave() diff --git a/src/App/Pages/Vault/VaultListCiphersPage.cs b/src/App/Pages/Vault/VaultListCiphersPage.cs index 85377af2d..b66c2efe4 100644 --- a/src/App/Pages/Vault/VaultListCiphersPage.cs +++ b/src/App/Pages/Vault/VaultListCiphersPage.cs @@ -59,7 +59,7 @@ namespace Bit.App.Pages public ExtendedObservableCollection> PresentationSections { get; private set; } = new ExtendedObservableCollection>(); public Cipher[] Ciphers { get; set; } = new Cipher[] { }; - public ListView ListView { get; set; } + public ExtendedListView ListView { get; set; } public SearchBar Search { get; set; } public ActivityIndicator LoadingIndicator { get; set; } public StackLayout NoDataStackLayout { get; set; } @@ -70,7 +70,7 @@ namespace Bit.App.Pages private void Init() { - ListView = new ListView(ListViewCachingStrategy.RecycleElement) + ListView = new ExtendedListView(ListViewCachingStrategy.RecycleElement) { IsGroupingEnabled = true, ItemsSource = PresentationSections, @@ -179,6 +179,7 @@ namespace Bit.App.Pages { if(Device.RuntimePlatform == Device.Android) { + ListView.BottomPadding = 170; Fab = new Fab(fabLayout, "plus.png", (sender, args) => Helpers.AddCipher(this, _folderId)); } else @@ -187,6 +188,10 @@ namespace Bit.App.Pages ToolbarItems.Add(AddCipherItem); } } + else if(Device.RuntimePlatform == Device.Android) + { + ListView.BottomPadding = 50; + } Content = fabLayout; } diff --git a/src/App/Pages/Vault/VaultListGroupingsPage.cs b/src/App/Pages/Vault/VaultListGroupingsPage.cs index 09fd4c505..860eeb440 100644 --- a/src/App/Pages/Vault/VaultListGroupingsPage.cs +++ b/src/App/Pages/Vault/VaultListGroupingsPage.cs @@ -50,7 +50,7 @@ namespace Bit.App.Pages public ExtendedObservableCollection> PresentationSections { get; private set; } = new ExtendedObservableCollection>(); - public ListView ListView { get; set; } + public ExtendedListView ListView { get; set; } public StackLayout NoDataStackLayout { get; set; } public ActivityIndicator LoadingIndicator { get; set; } private AddCipherToolBarItem AddCipherItem { get; set; } @@ -63,7 +63,7 @@ namespace Bit.App.Pages SearchItem = new SearchToolBarItem(this); ToolbarItems.Add(SearchItem); - ListView = new ListView(ListViewCachingStrategy.RecycleElement) + ListView = new ExtendedListView(ListViewCachingStrategy.RecycleElement) { IsGroupingEnabled = true, ItemsSource = PresentationSections, @@ -121,6 +121,7 @@ namespace Bit.App.Pages if(Device.RuntimePlatform == Device.Android) { Fab = new Fab(fabLayout, "plus.png", (sender, args) => Helpers.AddCipher(this, null)); + ListView.BottomPadding = 170; } else { diff --git a/src/App/Pages/Vault/VaultViewCipherPage.cs b/src/App/Pages/Vault/VaultViewCipherPage.cs index 4209b4c8e..93cc851e9 100644 --- a/src/App/Pages/Vault/VaultViewCipherPage.cs +++ b/src/App/Pages/Vault/VaultViewCipherPage.cs @@ -265,6 +265,10 @@ namespace Bit.App.Pages Table.RowHeight = -1; Table.EstimatedRowHeight = 70; } + else if(Device.RuntimePlatform == Device.Android) + { + Table.BottomPadding = 170; + } } protected async override void OnAppearing() diff --git a/src/iOS/Controls/ListViewRenderer.cs b/src/iOS/Controls/ExtendedListViewRenderer.cs similarity index 76% rename from src/iOS/Controls/ListViewRenderer.cs rename to src/iOS/Controls/ExtendedListViewRenderer.cs index 50f55c814..aac29d4b4 100644 --- a/src/iOS/Controls/ListViewRenderer.cs +++ b/src/iOS/Controls/ExtendedListViewRenderer.cs @@ -1,13 +1,14 @@ -using System; +using Bit.App.Controls; +using System; using System.ComponentModel; using UIKit; using Xamarin.Forms; using Xamarin.Forms.Platform.iOS; -[assembly: ExportRenderer(typeof(ListView), typeof(Bit.iOS.Controls.ListViewRenderer))] +[assembly: ExportRenderer(typeof(ExtendedListView), typeof(Bit.iOS.Controls.ExtendedListViewRenderer))] namespace Bit.iOS.Controls { - public class ListViewRenderer : Xamarin.Forms.Platform.iOS.ListViewRenderer + public class ExtendedListViewRenderer : ListViewRenderer { protected override void OnElementChanged(ElementChangedEventArgs e) { @@ -16,7 +17,7 @@ namespace Bit.iOS.Controls // primary color Control.SectionIndexColor = new UIColor(red: 0.24f, green: 0.55f, blue: 0.74f, alpha: 1.0f); - if(e.NewElement is ListView view) + if(e.NewElement is ExtendedListView view) { SetMargin(view); } @@ -31,7 +32,7 @@ namespace Bit.iOS.Controls } } - private void SetMargin(ListView view) + private void SetMargin(ExtendedListView view) { Control.ContentInset = new UIEdgeInsets( new nfloat(view.Margin.Top), diff --git a/src/iOS/iOS.csproj b/src/iOS/iOS.csproj index 2d3e70ea8..f20ccbe0b 100644 --- a/src/iOS/iOS.csproj +++ b/src/iOS/iOS.csproj @@ -226,7 +226,7 @@ - +