Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.programmingknowledge.mysqldemo;
- import android.content.Intent;
- import android.support.v7.app.AppCompatActivity;
- import android.os.Bundle;
- import android.view.View;
- import android.widget.EditText;
- public class MainActivity extends AppCompatActivity {
- EditText UsernameEt, PasswordEt;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- UsernameEt = (EditText) findViewById(R.id.etUserName);
- PasswordEt = (EditText) findViewById(R.id.etPassword);
- }
- public void OnLogin(View view) {
- String username = UsernameEt.getText().toString();
- String password = PasswordEt.getText().toString();
- String type = "login";
- BackgroundWorker backgroundWorker = new BackgroundWorker(this);
- backgroundWorker.execute(type, username, password);
- }
- public void OpenReg(View view) {
- startActivity(new Intent(this,Register.class));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement