clear focus on cell

This commit is contained in:
Kyle Spearrin 2018-12-11 10:13:17 -05:00
parent ff776e485a
commit f25ab537f2

View file

@ -97,13 +97,18 @@ namespace Bit.Android.Controls
bool isHeader, nextIsHeader; bool isHeader, nextIsHeader;
var cell = GetCellForPosition(position, out isHeader, out nextIsHeader); var cell = GetCellForPosition(position, out isHeader, out nextIsHeader);
var cellView = CellFactory.GetCell(cell, convertView, parent, Context, _view);
if(layout.ChildCount > 0) if(layout.ChildCount > 0)
{ {
layout.RemoveViewAt(0); layout.RemoveViewAt(0);
var cellView = CellFactory.GetCell(cell, convertView, parent, Context, _view);
layout.AddView(cellView, 0); layout.AddView(cellView, 0);
} }
if(cellView.HasFocus)
{
cellView.ClearFocus();
}
if(isHeader) if(isHeader)
{ {
var textCell = layout.GetChildAt(0) as BaseCellView; var textCell = layout.GetChildAt(0) as BaseCellView;