Advertisement
Guest User

Untitled

a guest
May 26th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.07 KB | None | 0 0
  1. package com.sourceit.butterknife;
  2.  
  3. import androidx.appcompat.app.AppCompatActivity;
  4. import butterknife.BindView;
  5. import butterknife.ButterKnife;
  6. import butterknife.OnClick;
  7. import butterknife.OnTextChanged;
  8.  
  9. import android.content.Intent;
  10. import android.os.Bundle;
  11. import android.text.Editable;
  12. import android.text.TextWatcher;
  13. import android.view.View;
  14. import android.widget.Button;
  15. import android.widget.EditText;
  16. import android.widget.Toast;
  17.  
  18. public class MainActivity extends AppCompatActivity {
  19.  
  20.     @BindView(R.id.input_text)
  21.     EditText editText;
  22.     @BindView(R.id.button)
  23.     Button button;
  24.  
  25.     @Override
  26.     protected void onCreate(Bundle savedInstanceState) {
  27.         super.onCreate(savedInstanceState);
  28.         setContentView(R.layout.activity_main);
  29.         ButterKnife.bind(this);
  30.     }
  31.  
  32.     @OnClick(R.id.button)
  33.     public void onButtonClick() {
  34.         Intent intent = new Intent(this, PasswordActivity.class);
  35.         intent.putExtra(Intent.EXTRA_EMAIL, editText.getText().toString());
  36.         startActivity(intent);
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement