Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.gagaga;
- import android.content.Intent;
- import android.os.Bundle;
- import com.google.android.material.floatingactionbutton.FloatingActionButton;
- import com.google.android.material.snackbar.Snackbar;
- import androidx.appcompat.app.AppCompatActivity;
- import androidx.appcompat.widget.Toolbar;
- import android.view.View;
- import android.widget.Button;
- public class modelx extends AppCompatActivity {
- private Button button;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_modelx);
- button = (Button)findViewById(R.id.BackBut);
- button.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- BackTo1();
- }
- });
- }
- public void BackTo1(){
- Intent intent = new Intent(this, MainActivity.class);
- startActivity(intent);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement