Wednesday, 28 August 2013

Get the widgets value out side the actitivty in Android?

Get the widgets value out side the actitivty in Android?

In my main activity there are few widgets like edit
text,textview,spinner.I want to get these widgets value in the class that
is called from the Activity.How could i do this .
Acces all the widgets value from different class that is called by the
main activity
click.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
//Like these i have few more of what i have to get the values
Spinner abc = (Spinner) findViewById(R.id.abc);
Spinner xyz = (Spinner) findViewById(R.id.xyz);
Spinner deg = (Spinner) findViewById(R.id.deg);
//This is my class where i want to access all the widgets
values and perform some action on that
GetValue obj = new GetValue();
obj.getAllData();
}
});
This is something what i want to do please help me i am not getting how
could i do this .What values i have to pass in the function to get the
values.Thanks

No comments:

Post a Comment