button1.setOnClickListener(new View.OnClickListener( ){
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(FirstActivity.this , SecondActivity.class);
                startActivityForResult(intent , 1);
                //startActivity(intent);
            }
        });