mirror of
https://github.com/bitwarden/android.git
synced 2024-12-18 23:31:52 +03:00
only use custom model renderer only when nofooter or noheader
This commit is contained in:
parent
2712ae10e6
commit
b1592bfd96
1 changed files with 14 additions and 4 deletions
|
@ -65,7 +65,15 @@ namespace Bit.iOS.Controls
|
||||||
|
|
||||||
private void SetSource()
|
private void SetSource()
|
||||||
{
|
{
|
||||||
Control.Source = new CustomTableViewModelRenderer((ExtendedTableView)Element);
|
var view = (ExtendedTableView)Element;
|
||||||
|
if(view.NoFooter || view.NoHeader)
|
||||||
|
{
|
||||||
|
Control.Source = new CustomTableViewModelRenderer(view);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Control.Source = Element.HasUnevenRows ? new UnEvenTableViewModelRenderer(Element) : new TableViewModelRenderer(Element);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetScrolling(ExtendedTableView view)
|
private void SetScrolling(ExtendedTableView view)
|
||||||
|
@ -142,7 +150,10 @@ namespace Bit.iOS.Controls
|
||||||
{
|
{
|
||||||
if(_view.NoHeader)
|
if(_view.NoHeader)
|
||||||
{
|
{
|
||||||
return new UIView(CGRect.Empty);
|
return new UIView(CGRect.Empty)
|
||||||
|
{
|
||||||
|
Hidden = true
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return base.GetViewForHeader(tableView, section);
|
return base.GetViewForHeader(tableView, section);
|
||||||
|
@ -162,11 +173,10 @@ namespace Bit.iOS.Controls
|
||||||
{
|
{
|
||||||
if(_view.NoFooter)
|
if(_view.NoFooter)
|
||||||
{
|
{
|
||||||
var view = new UIView(CGRect.Empty)
|
return new UIView(CGRect.Empty)
|
||||||
{
|
{
|
||||||
Hidden = true
|
Hidden = true
|
||||||
};
|
};
|
||||||
return view;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in a new issue