diff --git a/src/Android/Controls/ExtendedTableViewRenderer.cs b/src/Android/Controls/ExtendedTableViewRenderer.cs index 380cd48ae..338e7f127 100644 --- a/src/Android/Controls/ExtendedTableViewRenderer.cs +++ b/src/Android/Controls/ExtendedTableViewRenderer.cs @@ -72,31 +72,34 @@ namespace Bit.Android.Controls private ITableViewController Controller => _view; - // ref SO post http://bit.ly/2b9cjnQ + // ref http://bit.ly/2b9cjnQ public override AView GetView(int position, AView convertView, ViewGroup parent) { var baseView = base.GetView(position, convertView, parent); var layout = baseView as LinearLayout; + if(layout == null) + { + return baseView; + } bool isHeader, nextIsHeader; - var item = GetCellForPosition(position, out isHeader, out nextIsHeader); - var aview = CellFactory.GetCell(item, convertView, parent, Context, _view); + var cell = GetCellForPosition(position, out isHeader, out nextIsHeader); if(layout.ChildCount > 0) { layout.RemoveViewAt(0); + var cellView = CellFactory.GetCell(cell, convertView, parent, Context, _view); + layout.AddView(cellView, 0); } - layout.AddView(aview, 0); if(isHeader) { - baseView.SetBackgroundColor(Color.Transparent.ToAndroid()); - var textCell = aview as BaseCellView; + layout.SetBackgroundColor(Color.Transparent.ToAndroid()); + var textCell = layout?.GetChildAt(0) as BaseCellView; if(textCell != null) { - if(!_removedHeader && position == 0 && _view.NoHeader) + if(position == 0 && _view.NoHeader) { textCell.Visibility = ViewStates.Gone; - _removedHeader = true; } else { @@ -107,10 +110,10 @@ namespace Bit.Android.Controls } else { - baseView.SetBackgroundColor(_view.SeparatorColor.ToAndroid()); + layout.SetBackgroundColor(_view.SeparatorColor.ToAndroid()); } - return baseView; + return layout; } // Copy/pasted from Xamarin source. Invoke via reflection instead maybe? diff --git a/src/App/Pages/Settings/SettingsPage.cs b/src/App/Pages/Settings/SettingsPage.cs index 3fe64af0d..12c534494 100644 --- a/src/App/Pages/Settings/SettingsPage.cs +++ b/src/App/Pages/Settings/SettingsPage.cs @@ -180,7 +180,7 @@ namespace Bit.App.Pages private async void TwoStepCell_Tapped(object sender, EventArgs e) { - if(!await _userDialogs.ConfirmAsync("Two-step login makes your account more secure my requiring you to enter" + if(!await _userDialogs.ConfirmAsync("Two-step login makes your account more secure by requiring you to enter" + " a security code from an authenticator app whenever you log in. Two-step login can be enabled on the" + " bitwarden.com web vault. Do you want to visit the website now?", null, AppResources.Yes, AppResources.Cancel))