Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. public void toPounds(View view){
  2. EditText amount = (EditText)findViewById(R.id.amount);
  3.  
  4. Double omrAmount = Double.parseDouble(amount.getText().toString());
  5.  
  6. Double gbrAmount = omrAmount * 1.79;
  7.  
  8. Toast.makeText(getApplicationContext(), "£" + gbrAmount.toString(), Toast.LENGTH_LONG).show();
  9. }
  10.  
  11. public void toRiyals(View view){
  12. EditText amount = (EditText)findViewById(R.id.amount);
  13.  
  14. Double gbrAmount = Double.parseDouble(amount.getText().toString());
  15.  
  16. Double omrAmount = gbrAmount / 1.79;
  17.  
  18. Toast.makeText(getApplicationContext(), omrAmount.toString() + " Riyals", Toast.LENGTH_LONG).show();
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement