package com.example.clicker; import android.os.Bundle; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; import androidx.activity.EdgeToEdge; import androidx.appcompat.app.AppCompatActivity; import androidx.core.graphics.Insets; import androidx.core.view.ViewCompat; import androidx.core.view.WindowInsetsCompat; public class MainActivity extends AppCompatActivity { TextView mainText; Button drop_btn, minus_btn; ImageView mainBtn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); EdgeToEdge.enable(this); setContentView(R.layout.activity_main); ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> { Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()); v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom); return insets; }); mainText = findViewById(R.id.mainText); mainBtn = findViewById(R.id.main_btn); drop_btn = findViewById(R.id.drop_btn); minus_btn = findViewById(R.id.minus_btn); Click clickListener = new Click(mainText); mainBtn.setOnClickListener(clickListener); drop_btn.setOnClickListener(clickListener); minus_btn.setOnClickListener(clickListener); } }