So I’m fairly new to Android Development and Programming in general… I have a working converter with a fatal flaw, per conversion type (Temp, Area, etc.) it can only use 2 units (Yards to Meters and Meters to Yards for example). This is limited by a radioGroup that would get miserably inefficient within the code and be painstaking for the user to find the right conversion. So I want to move from the radioGroup and button way to a more efficient spinner one. In which on one spinner the user chooses what to convert from and then on the other what to convert to. How would I accomplish this without writing the code for each different unit while still using spinners to choose what to convert to,
private float convertSYardsToSMeters(float syards) {
return (float) (syards * .83613);
}
Thanks in advance… Sorry if this is a bit much just kind of confused.
You still need to write the method
how units are converted. With the Spinner you can only make the choosing from what to want unit to convert looks fancier, I dont know if the Spinner has something to ease the conversion. And based on choice from the spinner you apply method of conversion . Does it makes sense to you?