"I am not professional Blogger , i am here to help at some level to develop small application in Xamarin andorid for fresher"
Pass data from One Activity to Other Activity
Code :
FirstActivity :
var secondActivity = new Intent (this, typeof(SecondActivity));
secondActivity.PutExtra ("PassData", "Data");
StartActivity (secondActivity);
Key Name : "PassData"
Value Pair: "Data"
On other end it means in SecondActivity
SecondActivity :
string text ;
text = Intent.GetStringExtra ("PassData") ?? "Data not available";
If PassData is null than value of Text is "Data not available"
But here in Output : text = "Data"
Pass data from One Activity to Other Activity
Code :
FirstActivity :
var secondActivity = new Intent (this, typeof(SecondActivity));
secondActivity.PutExtra ("PassData", "Data");
StartActivity (secondActivity);
Key Name : "PassData"
Value Pair: "Data"
On other end it means in SecondActivity
SecondActivity :
string text ;
text = Intent.GetStringExtra ("PassData") ?? "Data not available";
If PassData is null than value of Text is "Data not available"
But here in Output : text = "Data"
Comments
Post a Comment