mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +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>
|
<ContentPage.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
|
<u:InverseBoolConverter x:Key="inverseBool" />
|
||||||
<u:StringHasValueConverter x:Key="stringHasValue" />
|
<u:StringHasValueConverter x:Key="stringHasValue" />
|
||||||
|
|
||||||
<DataTemplate
|
<DataTemplate
|
||||||
|
@ -54,11 +55,15 @@
|
||||||
<ListView.GroupHeaderTemplate>
|
<ListView.GroupHeaderTemplate>
|
||||||
<DataTemplate x:DataType="pages:SettingsPageListGroup">
|
<DataTemplate x:DataType="pages:SettingsPageListGroup">
|
||||||
<ViewCell>
|
<ViewCell>
|
||||||
|
<StackLayout Padding="0" Spacing="0">
|
||||||
|
<BoxView StyleClass="list-section-separator"
|
||||||
|
IsVisible="{Binding First, Converter={StaticResource inverseBool}}" />
|
||||||
<StackLayout StyleClass="list-row-header">
|
<StackLayout StyleClass="list-row-header">
|
||||||
<Label
|
<Label
|
||||||
Text="{Binding Name}"
|
Text="{Binding Name}"
|
||||||
StyleClass="list-header, list-header-platform" />
|
StyleClass="list-header, list-header-platform" />
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
|
</StackLayout>
|
||||||
</ViewCell>
|
</ViewCell>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.GroupHeaderTemplate>
|
</ListView.GroupHeaderTemplate>
|
||||||
|
|
|
@ -4,7 +4,8 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
public class SettingsPageListGroup : List<SettingsPageListItem>
|
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);
|
AddRange(groupItems);
|
||||||
if(string.IsNullOrWhiteSpace(name))
|
if(string.IsNullOrWhiteSpace(name))
|
||||||
|
@ -19,8 +20,10 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
Name = name;
|
Name = name;
|
||||||
}
|
}
|
||||||
|
First = first;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool First { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,7 +339,7 @@ namespace Bit.App.Pages
|
||||||
};
|
};
|
||||||
GroupedItems.ResetWithRange(new List<SettingsPageListGroup>
|
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(manageItems, AppResources.Manage, doUpper),
|
||||||
new SettingsPageListGroup(securityItems, AppResources.Security, doUpper),
|
new SettingsPageListGroup(securityItems, AppResources.Security, doUpper),
|
||||||
new SettingsPageListGroup(accountItems, AppResources.Account, doUpper),
|
new SettingsPageListGroup(accountItems, AppResources.Account, doUpper),
|
||||||
|
|
Loading…
Reference in a new issue