Von MainActivity.cs
zu AnotherActivity.cs
Wie man Daten von editText.text auf eine andere Tätigkeit in Xamarin Android passieren, wenn die Taste
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);
};
}
}
Hat Ihr EditExt gibt es in Aktivität A und Sie müssen Daten in Aktivität B? – Sumant
Sie setzen die Variablen 'hisname' und' hername' nicht auf die Werte aus den Feldern 'EditText'. –