app/src/main/java/ar/com/wolox/android/example/ui/login/LoginPresenter.java
/**
     * @param context Context of LoginFragment
     * @param emailKey String
     * @param passwordKey String
     * @param sharedPrefKey String
     */
@param context Context of LoginFragment
@param emailKey String
@param passwordKey String
@param sharedPrefKey String
@param context Context of LoginFragment @param emailKey String @param passwordKey String @param sharedPrefKey String
public void onInit(Context context, String emailKey, String passwordKey, String sharedPrefKey) {
        SharedPreferences sharedPreferences = context.getSharedPreferences(sharedPrefKey, Context.MODE_PRIVATE);
        String email = sharedPreferences.getString(emailKey, "");
        String password = sharedPreferences.getString(passwordKey, "");
        getView().showCredentials(email, password);
        if (!email.isEmpty() && !password.isEmpty()) {
            getView().goHome();
        }
    }
public void onInit ( Context context , String emailKey , String passwordKey , String sharedPrefKey ) { SharedPreferences sharedPreferences = context . getSharedPreferences ( sharedPrefKey , Context . MODE_PRIVATE ) ; String email = sharedPreferences . getString ( emailKey , "" ) ; String password = sharedPreferences . getString ( passwordKey , "" ) ; getView ( ) . showCredentials ( email , password ) ; if ( ! email . isEmpty ( ) && ! password . isEmpty ( ) ) { getView ( ) . goHome ( ) ; } }
@param context Context of LoginFragment
 @param emailKey String
 @param passwordKey String
 @param sharedPrefKey String
@param context Context of LoginFragment @param emailKey String @param passwordKey String @param sharedPrefKey String