open new activity using android studio #android #development #python #coding #short #easy #how



open new activity using android studio #android #development #python #coding #short #easy #how

open new activity using android studio #android #development #python #coding #short #easy #how

open new activity using android studio #android #development #python #coding #short #easy #how

package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {
private Button button ;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button = findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
cadeauhommepage();
}
});
}
public void cadeauhommepage(){
Intent intent = new Intent(this,cadeauHomme.class);
startActivity(intent);

}
}

Comments are closed.