當從MainActivity.cs
到AnotherActivity.cs
按鈕被點擊
public static string hisname;
public static string hername;
private Handler mHandler = new Handler();
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.Register1);
// Create your application here
EditText her = FindViewById<EditText>(Resource.Id.editTextHername);
EditText his = FindViewById<EditText>(Resource.Id.editTextUrname);
//RotateAnimation anim = new RotateAnimation(0f, 350f, 15f, 15f);
//anim.setInterpolator
//anim.setRepeatCount(Animation.INFINITE);
//anim.Duration(700);
//splash.StartAnimation(anim);
WindowRotationAnimation q = new WindowRotationAnimation();
Button getStarted = FindViewById<Button>(Resource.Id.myButton);
getStarted.Click += delegate
{
var intent = new Intent(this, typeof(CalculateActivity));
intent.PutExtra("yourname", ""+hisname);
intent.PutExtra("GFname", "" + hername);
StartActivity(intent);
};
}
}
貴editext有在活動A,你需要在活動B數據之前? – Sumant
您並未將'hisname'和'hername'變量設置爲EditText字段中的值。 –