you can save the value using something like this:
final EditText eActNametwo = (EditText)findViewById(R.id.eACTNametwo);
final EditText eActBudtwo = (EditText)findViewById(R.id.eACTBudtwo);
bCreatetwo = (Button)findViewById(R.id.bCreateActivitytwo);
bCreatetwo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
SharedPreferences settingstwo = getSharedPreferences(actnamefiletwo,0);
SharedPreferences.Editor editortwo = settingstwo.edit();
editortwo.putString("nametwo", eActNametwo.getText().toString());
editortwo.putString("budtwo", eActBudtwo.getText().toString());
editortwo.commit();
}
});
and then u call the value somewhere using this
entvActNametwo = (TextView) findViewById(R.id.tvActNametwo);
tvActBudtwo = (TextView) findViewById(R.id.tvActBudtwo);
SharedPreferences settingstwo = getSharedPreferences(actnamefiletwo, 0);
tvActNametwo.setText(settingstwo.getString("nametwo", ""));
tvActBudtwo.setText(settingstwo.getString("budtwo", ""));
you will need to call your string prior to onCreate like this:
public static final String actnamefiletwo = "actnamebudtwo";
This is an example from my own app, hope it helps