title: how to use getSharedPreferences in android
body: <p>I have an application in which I have to implement a "Login" activity. I have these components:</p>
  
  <ol>
  <li>EditText username</li>
  <li>EditText password</li>
  <li>Button Login</li>
  <li>Button Cancel</li>
  </ol>
  
  <p>I want that my application to remember the login details of the user once the user has logged in until the user would press the "log out" button. I'm not using preferences in my xml.</p>
  
  <p>How do I get the getSharedPreferences(String name, int mode) to work in my application?</p>