Answers for "how to change activity kotlin"

2

go to activity android

//going to another activity while ending the 
//previous one so that users cannot go back
btListe = (ImageButton)findViewById(R.id.Button_Liste);
    btListe.setOnClickListener(new OnClickListener()
    {    public void onClick(View v)
        {
            intent = new Intent(main.this, ListViewImage.class);
            startActivity(intent);
            finish();
        }
    });
Posted by: Guest on October-08-2020
0

navigate to another activity in android

OnClickListener onClickListener = new OnClickListener() {
    @Override
    public void onClick(View v) {
        startActivity(new Intent(action));
    }
};

Button button = (Button) findViewById(id);
button.setOnClickListener(onClickListener);
Posted by: Guest on July-13-2020
-1

android studio change activity kotlin

val button: Button = findViewById(R.id.Button)

button.setOnClickListener{

	val intent: intent = Intent(applicationContext, ActivityToBeOpened::class.java){

		startActivity(intent)

	}
}
Posted by: Guest on July-04-2021

Code answers related to "how to change activity kotlin"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language