Answers for "android studio button setonclicklistener"

4

onclicklistener in android studio

Name.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this,FileName.class));
            }
        });
Posted by: Guest on January-12-2021
0

android setonclicklistener

Button play,pause,stop;
        play=findViewById(R.id.btnplay);
        pause=findViewById(R.id.btnPause);
        stop=findViewById(R.id.btnStop);

        play.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

            }
        });
        stop.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

            }
        });
        pause.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

            }
        });
Posted by: Guest on September-17-2021

Code answers related to "android studio button setonclicklistener"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language