Android OnActivityResult

안드로이드에서 액티비티의 결과로 다음코드를 진행하고자 할때는 다음과 같이합니다.

protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
   base.OnActivityResult(requestCode, resultCode, data);
   if (resultCode == Result.Ok)
   {
        var helloLabel = FindViewById (Resource.Id.helloLabel);
        helloLabel.Text = data.GetStringExtra("greeting");
    }
}

        
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s