Hey, I\'m really new with android development just started a few hours ago. I need to make a application for a school project and it needs to be done soon.
So far ha
You can try setting the onItemSelectedListener to your spinner:
EDIT:
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Spinner spinner = (Spinner) findViewById(R.id.spinner);
ArrayAdapter adapter = ArrayAdapter.createFromResource( this, R.array.planets_array, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinner.setAdapter(adapter);
spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView> arg0, View arg1,
int arg2, long arg3) {
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse("http://yoururl.com")));
}
@Override
public void onNothingSelected(AdapterView> arg0) {}
});
This will open the browser with your url.