From 72ab132979baa39cda477dc0f63d82d30a976542 Mon Sep 17 00:00:00 2001 From: AlexVallat Date: Sat, 13 Jul 2013 19:57:04 +0100 Subject: [PATCH] Made FindViewById usage compatible with older version of Mono for Android (not using generic overload) --- src/keepass2android/EntryEditActivity.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/keepass2android/EntryEditActivity.cs b/src/keepass2android/EntryEditActivity.cs index 1acd7f8b..bc42210f 100644 --- a/src/keepass2android/EntryEditActivity.cs +++ b/src/keepass2android/EntryEditActivity.cs @@ -830,7 +830,7 @@ namespace keepass2android private void CopyFieldFromExtraDialog(View eesButton, object dialog, int fieldId) { - var sourceField = ((Dialog)dialog).FindViewById(fieldId); + var sourceField = (EditText)((Dialog)dialog).FindViewById(fieldId); var targetField = ((TextView)((View)eesButton.Parent).FindViewById(fieldId)); if (sourceField.Text != targetField.Text) { @@ -841,7 +841,7 @@ namespace keepass2android private void CopyCheckboxFromExtraDialog(View eesButton, object dialog, int fieldId) { - var sourceField = ((Dialog)dialog).FindViewById(fieldId); + var sourceField = (CheckBox)((Dialog)dialog).FindViewById(fieldId); var targetField = ((CheckBox)((View)eesButton.Parent).FindViewById(fieldId)); if (sourceField.Checked != targetField.Checked) {