Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.lapitmessenger;
- import androidx.appcompat.app.AppCompatActivity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.view.View;
- import android.widget.Button;
- public class StartActivity extends AppCompatActivity {
- private Button mRegButton;
- private Button mLogButton;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_start);
- mRegButton = findViewById(R.id.start_reg_button);
- mLogButton = findViewById(R.id.log_in_button);
- mRegButton.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- Intent regIntent = new Intent(StartActivity.this, RegisterActivity.class);
- startActivity(regIntent);
- }
- });
- mLogButton.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- Intent intent = new Intent(StartActivity.this, LoginActivity.class);
- startActivity(intent);
- finish();
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement