Hoping this is a simple one.
I need to set some variables to hold the selected values from my time picker and spinner.
Currently I’m trying to set the picked time using the ‘Time’ object but im getting an error that my arguments don’t match those of the constructor:
Current code:
//Error on the constructor.
Time setTime = new Time(dobHour, dobMinute);
My second issue is that I’m trying to set the selected option from my spinner to a variable. Can someone tell me how I can set the selected spinner item to a variable (so i can insert it into my database).
As shown:
\\I realize this is the wrong format. Could someone
\\tell me what I need to set it as?
String typeToSet = setType.getText().toString();
You can get the selected spinner item to a variable this way:
To set time you can do this :
Thanks.