Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_startup);
- LoginButton();
- }
- public void LoginButton(){
- username = (EditText)findViewById(R.id.login_username);
- password = (EditText)findViewById(R.id.login_password);
- login_button = (Button)findViewById(R.id.startup_login_button);
- login_button.setOnClickListener(
- new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- if (username.getText().toString().equals("admin") && password.getText().toString().equals("admin")){
- Intent intent = new Intent(getApplicationContext(),MainActivity.class);
- startActivity(intent);
- }
- }
- }
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement