SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.example.percobaanrelativelayout;
  2.  
  3. import android.support.v7.app.AppCompatActivity;
  4. import android.os.Bundle;
  5. import android.view.View;
  6. import android.widget.Button;
  7. import android.widget.Toast;
  8.  
  9. public class MainActivity extends AppCompatActivity implements View.OnClickListener {
  10.     Button btnLogin;
  11.  
  12.     @Override
  13.     protected void onCreate(Bundle savedInstanceState) {
  14.         super.onCreate(savedInstanceState);
  15.         setContentView(R.layout.activity_main);
  16.  
  17.         btnLogin = findViewById(R.id.btn_login);
  18.  
  19.         btnLogin.setOnClickListener(this);
  20.  
  21.     }
  22.  
  23.     @Override
  24.     public void onClick(View view) {
  25.         if(view.getId()==R.id.btn_login){
  26.             Toast.makeText(this,"Anda berhasil Login!",Toast.LENGTH_LONG).show();
  27.         }
  28.     }
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top