是什么问题? priceMessage
没给我看这个问题,所以我可以解决它
为什么显示灰线而没有红色警告?
我试图弄清楚什么都没用
那么priceMessage
怎么了?
private int calculatePrice() {
int price = quantity * 5;
return price;}
public void submitOrder(View view) {
int Price=calculatePrice();
String priceMessage = " total "+ Price;
priceMessage = priceMessage + "\n Thank you";
displayMessage(priceMessage);}
private void displayMessage(String message) {
TextView priceTextView = (TextView) findViewById(R.id.price_text_view);
priceTextView.setText(NumberFormat.getCurrencyInstance().format(message));
}
答案 0 :(得分:0)