mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 09:58:27 +03:00
remove test list page
This commit is contained in:
parent
9cd4145217
commit
96daac9b34
3 changed files with 1 additions and 70 deletions
|
@ -82,7 +82,6 @@
|
||||||
<Compile Include="Pages\LoginNavigationPage.cs" />
|
<Compile Include="Pages\LoginNavigationPage.cs" />
|
||||||
<Compile Include="Pages\MainPage.cs" />
|
<Compile Include="Pages\MainPage.cs" />
|
||||||
<Compile Include="Pages\SettingsEditFolderPage.cs" />
|
<Compile Include="Pages\SettingsEditFolderPage.cs" />
|
||||||
<Compile Include="Pages\TestListPage.cs" />
|
|
||||||
<Compile Include="Pages\SyncPage.cs" />
|
<Compile Include="Pages\SyncPage.cs" />
|
||||||
<Compile Include="Pages\SettingsPage.cs" />
|
<Compile Include="Pages\SettingsPage.cs" />
|
||||||
<Compile Include="Pages\SettingsListFoldersPage.cs" />
|
<Compile Include="Pages\SettingsListFoldersPage.cs" />
|
||||||
|
|
|
@ -126,7 +126,7 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
private void TouchIdCell_Tapped(object sender, EventArgs e)
|
private void TouchIdCell_Tapped(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Navigation.PushAsync(new TestListPage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FoldersCell_Tapped(object sender, EventArgs e)
|
private void FoldersCell_Tapped(object sender, EventArgs e)
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
using System;
|
|
||||||
using Xamarin.Forms;
|
|
||||||
using Bit.App.Utilities;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Bit.App.Pages
|
|
||||||
{
|
|
||||||
public class TestListPage : ContentPage
|
|
||||||
{
|
|
||||||
public TestListPage()
|
|
||||||
{
|
|
||||||
var textCell = new TextCell();
|
|
||||||
textCell.SetBinding<Bar>(TextCell.TextProperty, s => s.BarName);
|
|
||||||
|
|
||||||
var listView = new ListView
|
|
||||||
{
|
|
||||||
IsGroupingEnabled = true,
|
|
||||||
GroupDisplayBinding = new Binding("FooName"),
|
|
||||||
ItemsSource = Items,
|
|
||||||
ItemTemplate = new DataTemplate(() => textCell),
|
|
||||||
HasUnevenRows = true,
|
|
||||||
SeparatorColor = Color.FromHex("d2d6de")
|
|
||||||
};
|
|
||||||
|
|
||||||
Content = listView;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ExtendedObservableCollection<Foo> Items { get; private set; } = new ExtendedObservableCollection<Foo>();
|
|
||||||
|
|
||||||
protected override void OnAppearing()
|
|
||||||
{
|
|
||||||
base.OnAppearing();
|
|
||||||
|
|
||||||
var foos = new List<Foo>();
|
|
||||||
foos.Add(new Foo("Foo 1", MakeBars()));
|
|
||||||
foos.Add(new Foo("Foo 2", MakeBars()));
|
|
||||||
foos.Add(new Foo("Foo 3", MakeBars()));
|
|
||||||
foos.Add(new Foo("Foo 4", MakeBars()));
|
|
||||||
Items.Reset(foos);
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerable<Bar> MakeBars()
|
|
||||||
{
|
|
||||||
var numbers = new List<Bar>();
|
|
||||||
for(int i = 0; i < 100; i++)
|
|
||||||
{
|
|
||||||
numbers.Add(new Bar { BarName = i.ToString() });
|
|
||||||
}
|
|
||||||
return numbers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Foo : List<Bar>
|
|
||||||
{
|
|
||||||
public Foo(string name, IEnumerable<Bar> bars)
|
|
||||||
{
|
|
||||||
FooName = name;
|
|
||||||
AddRange(bars);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string FooName { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Bar
|
|
||||||
{
|
|
||||||
public string BarName { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue