private void DetailsButton_Click(object sender, EventArgs e) { FragmentTransaction ft = FragmentManager.BeginTransaction(); DefectAddDetailsFragment defectAddDetailsFragment = new DefectAddDetailsFragment(); ft.Replace(Resource.Id.container1, defectAddDetailsFragment); ft.Commit(); }
private void SaveButton_Click(object sender, EventArgs e) { DefectAddDetailsFragment defectAddDetailsFragment = FragmentManager.FindFragmentById <DefectAddDetailsFragment>(Resource.Id.container1); defect.Priority = defectAddDetailsFragment.PriorityText.Text; defect.Description = defectAddDetailsFragment.DescriptionText.Text; defect.Item = defectAddDetailsFragment.ItemNameText.Text; defect.Type = defectAddDetailsFragment.TypeText.Text; defect.Component = defectAddDetailsFragment.compNameText.Text; Log.Debug("new object created:", defect.ToString()); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_add_defect); checkPermissionForStorage(); //defect = new Defect(System.Guid.NewGuid().ToString()); defect = new Defect("Defect002"); CreateFolders(defect.Id, false); detailsButton = (Button)FindViewById(Resource.Id.detailsButton); imageButton = (Button)FindViewById(Resource.Id.imageButton); detailsButton.Click += DetailsButton_Click; imageButton.Click += ImageButton_Click; saveButton = (Button)FindViewById(Resource.Id.saveButton); saveButton.Click += SaveButton_Click; FragmentTransaction ft = FragmentManager.BeginTransaction(); DefectAddDetailsFragment defectAddDetailsFragment = new DefectAddDetailsFragment(); ft.Replace(Resource.Id.container1, defectAddDetailsFragment); ft.Commit(); }