I have one text box in SignUp layout and one text box in logIn layout. Now how to validate text box value using shared preferences in android?
Simple..
Considering signupText
, loginText
as object.
store signupText in preference.
mPreferenceData.storeInPreference("signup",
signupText.getText().toString().trim()));
in login page
String signUpText = mPreferenceData.getStoreInPreference("signup");
//now you will have data in signupText
button.setOnClickListener(new View.OnClickListener(){
if(loginText.getText().toString().trim().equalsIgnoreCase(signUpText)){
// now loginText whatever data that matches with signUpText will make to login successful
} else{
//failure
}
});