把我的头发拉在这里。无论选择哪个单选按钮,套餐价格始终为 525.00。关于我做错了什么有什么想法吗?
//Get and set package selected.
radioPackageGroup = (RadioGroup) findViewById(R.id.radTadPackage);
int selectedId = radioPackageGroup.getCheckedRadioButtonId();
btnPackage = (RadioButton) findViewById(selectedId);
String display_package_selected = btnPackage.getText().toString();
TadGlobals.getTadPackageInstance().setTadPackage(display_package_selected);
//Set package price.
double package_price = 0.00;
if(display_package_selected == "Bronze"){
package_price = 150.00;
}else if(display_package_selected == "Silver"){
package_price = 225.00;
}else if(display_package_selected == "Gold"){
package_price = 375.00;
}else{
package_price = 525.00;
}
TadGlobals.getPackagePriceInstance().setPackagePrice(package_price);