ANDROİD ACTIVITY ARASI GEÇİŞ

android activity

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {
    private Button btn_btn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btn_btn= (Button)findViewById(R.id.btn);
        btn_btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //Butona basıldığında yapılacak komutlar
                Intent comintent = new Intent(MainActivity.this, CommunicationActivity.class);
                startActivity(comintent);
            }
        });
    }
}

Leave a Reply