-
-
Save OyaCanli/d6bb57258b85b6fdfe3dc255dd0e2e38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InverseMethod("buttonIdToProcurementType") | |
public static int procurementTypeToButtonId(ProcurementType procurementType ){ | |
int selectedButtonId = -1; | |
if(procurementType == null){ | |
return selectedButtonId; | |
} | |
switch (procurementType){ | |
case BOUGHT: { | |
selectedButtonId = R.id.radioBtn_bought; | |
break; | |
} | |
case RECEIVED: { | |
selectedButtonId = R.id.radioBtn_received; | |
break; | |
} | |
} | |
return selectedButtonId; | |
} | |
public static ProcurementType buttonIdToProcurementType(int selectedButtonId){ | |
ProcurementType procurementType = null; | |
switch (selectedButtonId){ | |
case R.id.radioBtn_bought: { | |
procurementType = ProcurementType.BOUGHT; | |
break; | |
} | |
case R.id.radioBtn_received: { | |
procurementType = ProcurementType.RECEIVED; | |
} | |
} | |
return procurementType; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment