Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.damian.myapplication;
- import android.content.Intent;
- import android.support.v7.app.AppCompatActivity;
- import android.os.Bundle;
- import android.view.View;
- import android.widget.Button;
- import android.widget.EditText;
- import android.widget.TextView;
- import butterknife.BindView;
- import butterknife.ButterKnife;
- import butterknife.OnClick;
- public class MainActivity extends AppCompatActivity {
- @BindView(R.id.etUsername) EditText etUsername;
- @BindView(R.id.etPassword) EditText etPassword;
- @BindView(R.id.btnLogin) Button btnLogin;
- //TextView etUsername;
- //TextView etPassword;
- //Button btnLogin;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- ButterKnife.bind(this);
- }
- @OnClick(R.id.btnLogin)
- public void onButtonLoginClick() {
- String username = etUsername.getText().toString();
- String password = etPassword.getText().toString();
- Intent menuIntent = new Intent(this, MainActivity.class);
- menuIntent.putExtra(IntentExtras.USERNAME, username);
- menuIntent.putExtra(IntentExtras.PASSWORD, password);
- finish();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement