Guest User

Untitled

a guest
Dec 10th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public void onCreate(Bundle savedInstanceState)
  2. {
  3. quantity=(Spinner)findViewById(R.id.quantity);
  4.  
  5. quantity.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
  6. {
  7. public void onItemSelected(AdapterView<?> parent, View view, int pos, long id)
  8. {
  9. if(quantity.getSelecteditem.equals("5")){
  10.  
  11. price.setText("200");
  12. }
  13.  
  14. System.out.println("it works... ");
  15.  
  16. }
  17.  
  18. public void onNothingSelected(AdapterView<?> parent)
  19. {
  20.  
  21. }
  22. });
  23.  
  24.  
  25. }
Add Comment
Please, Sign In to add comment