daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Dec 10th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top