December 25th, 2011, 09:23 AM
|
#3 (permalink)
|
|
Junior Member
Join Date: Dec 2011
Location: Carmel, Indiana
Posts: 42
Device(s): Droid Charge
Thanks: 7
Thanked 1 Time in 1 Post
|
Thanks will give that a shot.
That worked like a charm.. for anyone that is interested on how to change activities from a spinner without having a button here is the code. Still needs some work
Code:
class PlanSelectionListener implements OnItemSelectedListener {
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
//Display Selected option
if(parent.getItemAtPosition(pos).toString().equals("Individual Plans")) {
Intent i = new Intent(getApplicationContext(),IndividualPlanActivity.class);
startActivity(i);
}
Toast.makeText(parent.getContext(), parent.getItemAtPosition(pos).toString() + " selected ", Toast.LENGTH_LONG).show();
}
public void onNothingSelected(AdapterView<?> parent) {
}
}
|
|
|
Last edited by ondrovic; December 25th, 2011 at 11:52 AM.
|
|