mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
list section separator on settings page
This commit is contained in:
parent
aa3fd29508
commit
6588b5bebb
3 changed files with 14 additions and 6 deletions
|
@ -13,6 +13,7 @@
|
|||
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<u:InverseBoolConverter x:Key="inverseBool" />
|
||||
<u:StringHasValueConverter x:Key="stringHasValue" />
|
||||
|
||||
<DataTemplate
|
||||
|
@ -54,10 +55,14 @@
|
|||
<ListView.GroupHeaderTemplate>
|
||||
<DataTemplate x:DataType="pages:SettingsPageListGroup">
|
||||
<ViewCell>
|
||||
<StackLayout StyleClass="list-row-header">
|
||||
<Label
|
||||
Text="{Binding Name}"
|
||||
StyleClass="list-header, list-header-platform" />
|
||||
<StackLayout Padding="0" Spacing="0">
|
||||
<BoxView StyleClass="list-section-separator"
|
||||
IsVisible="{Binding First, Converter={StaticResource inverseBool}}" />
|
||||
<StackLayout StyleClass="list-row-header">
|
||||
<Label
|
||||
Text="{Binding Name}"
|
||||
StyleClass="list-header, list-header-platform" />
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
|
|
|
@ -4,7 +4,8 @@ namespace Bit.App.Pages
|
|||
{
|
||||
public class SettingsPageListGroup : List<SettingsPageListItem>
|
||||
{
|
||||
public SettingsPageListGroup(List<SettingsPageListItem> groupItems, string name, bool doUpper = true)
|
||||
public SettingsPageListGroup(List<SettingsPageListItem> groupItems, string name, bool doUpper = true,
|
||||
bool first = false)
|
||||
{
|
||||
AddRange(groupItems);
|
||||
if(string.IsNullOrWhiteSpace(name))
|
||||
|
@ -19,8 +20,10 @@ namespace Bit.App.Pages
|
|||
{
|
||||
Name = name;
|
||||
}
|
||||
First = first;
|
||||
}
|
||||
|
||||
public bool First { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -339,7 +339,7 @@ namespace Bit.App.Pages
|
|||
};
|
||||
GroupedItems.ResetWithRange(new List<SettingsPageListGroup>
|
||||
{
|
||||
new SettingsPageListGroup(autofillItems, AppResources.Autofill, doUpper),
|
||||
new SettingsPageListGroup(autofillItems, AppResources.Autofill, doUpper, true),
|
||||
new SettingsPageListGroup(manageItems, AppResources.Manage, doUpper),
|
||||
new SettingsPageListGroup(securityItems, AppResources.Security, doUpper),
|
||||
new SettingsPageListGroup(accountItems, AppResources.Account, doUpper),
|
||||
|
|
Loading…
Reference in a new issue