title: Error comming on maketext in toast
body: <pre><code>public void onClick(View v) {
  
  
          {
  
  
              if (db==null) db = new DB(AddStation.this);
              if(v.getId()==R.id.ADD ) {
                  String code = Scode.getText().toString().trim();
                  String name = SName.getText().toString().trim();
                  String fac = SFac.getText().toString().trim();
                  if(name.equals("")){
                      Scode.setError("Invalid name");
                      return;
                  }
  
                  if (code.equals("")){ Scode.setError("Invalid email");
                      return;
                  }
                      if (db.addStudent(code, name, fac))
                          Toast.makeText(AddStation.this, "Student added", Toast.LENGTH_SHORT).show();
  
                  else if (v.getId()==R.id.See) {
                  Toast.makeText(AddStation.this, db.getAllStudents(), Toast.LENGTH_LONG).show();
                  //Log.v("EditText", db.getAllStudents().toString());
  
                      }
                  }
  
                  }
              db.close();
              Toast.makeText(AddStation.this, db.getAllStudents(), Toast.LENGTH_SHORT).show();
              }
      }
  </code></pre>
  
  <p>AddStation is my Fragment name. how to solve this ?
  this toast is retriving database and can u guys tell me how to bring data into a dropdown box  or gridview instead of a toast. thanks!</p>