public override void OnBackPressed() { if (wPopup.Showing) { if (wPopup.history.Count > 0) { int lastWord = wPopup.history[(wPopup.history.Count - 1)]; wPopup.history.Remove(wPopup.history.Count - 1); wPopup.show(wPopup.parent, wPopup.history.Count > 0 ? null : wPopup.line, lastWord, wPopup.showX, false); } else { wPopup.dismiss(); } } else { base.OnBackPressed(); } }
public override void OnClick(View view) { int wordNum = Dict.BinarySearch(link, false); if (wordNum != -1) { if (outerInstance.history.Count > 0) { outerInstance.history.Add(outerInstance.entry); } else { outerInstance.history.Add(outerInstance.wordIndex); } outerInstance.show(outerInstance.parent, null, wordNum, outerInstance.showX, false); } else { Toast.MakeText(outerInstance.mContext, "The word is not in the dictionary", ToastLength.Long).Show(); } }