0
在我的xamarin android應用程序中,我試圖用facebook帳戶登錄。如果Facebook帳戶沒有電子郵件地址,我將使用輸入和保存按鈕設置新的內容視圖,如何等待按鈕單擊以繼續之前的內容視圖工作?Xamarin Android等待按鈕點擊
這是我的代碼,我正在製作新的內容視圖,並希望等待按鈕點擊:
public void OnCompleted(JSONObject @object, GraphResponse response)
{
var email = @object.Get("email").ToString();
if (string.IsNullOrEmpty(email))
{
SetContentView(Resource.Layout.CompleteRegistrationView);
//At this point, I want to wait until the user enters the email address and clicks the button. After that, I want to execute this method
var button = FindViewById(Resource.Id.save_email_btn);
button.Click += (s, arg) => {
email = FindViewById<EditText>(Resource.Id.email_value).Text;
CloseContextMenu();
};
}
((LoginViewModel)ViewModel).SaveUserCommandHandler();
}