i have this code
go_btn.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent myIntent = new Intent(LoginActivity.this, WebActivity.class);
myIntent.putExtra("id", ed_txt.getText().toString());
myIntent.putExtra("type", spinner.getText().toString());
LoginActivity.this.startActivity(myIntent);
i want the selected option in the spinner to my string.
this give me an error
myIntent.putExtra("type", spinner.getText().toString());
when i use
myIntent.putExtra("type", spinner.getContext().toString());
i am getting my package name.
how do i get my selected item
use
instad of
for getting selected item text from Spinner