Skip to content

Instantly share code, notes, and snippets.

@pentium10
Created June 8, 2011 16:53
Show Gist options
  • Save pentium10/1014813 to your computer and use it in GitHub Desktop.
Save pentium10/1014813 to your computer and use it in GitHub Desktop.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
if(prefs !=null && prefs.getString("username", null)!=null)
{
Intent i = new Intent(getApplicationContext(), Customer.class);
startActivity(i);
}
etUsername = (EditText)findViewById(R.id.username);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment