private void Return_List_Click(object sender, EventArgs e) { if (plantList != null) { StartActivity(SwitchActivity.intent(this, typeof(PlantListActivity), File_Path())); } else { Toast.MakeText(this, "Warning! Invisibles lists will turn your phone into a unicorn!", ToastLength.Short).Show(); } }
private void ListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e) { //finds the item clicked and sets the plant name to a string string name = plantList.Items[e.Position].PlantName; //uses the plant name to find the item in the json file //opens uses an intent to open the ViewPlantActivity and send a json string file StartActivity(SwitchActivity.intent(this, typeof(ViewPlantActivity), data, name)); }
private void Save_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(plantObject.PlantName)) { //to do: calls the save function (need to make) Save_File(File_Path()); //opens uses an intent to open the ViewPlantActivity and send a json string file StartActivity(SwitchActivity.intent(this, typeof(ViewPlantActivity), File_Path())); } else { Toast.MakeText(this, "Do you really want to save an invisible plant?", ToastLength.Short).Show(); //To do: make multiple toast messages a different one per click. } }
//opens the list view private void Open_List(object sender, EventArgs e) { ////calls start activity on the custom intent object and sends the data along with the user to the plant list view StartActivity(SwitchActivity.intent(this, typeof(PlantListActivity), _data)); }